[Python-modules-commits] [python-cs] 01/03: Import python-cs_0.8.2.orig.tar.gz

Vincent Bernat bernat at moszumanska.debian.org
Thu May 5 10:46:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

bernat pushed a commit to branch master
in repository python-cs.

commit 575859dbbc47c1843b516c46861e7cd30ec9141f
Author: Vincent Bernat <bernat at debian.org>
Date:   Thu May 5 12:44:18 2016 +0200

    Import python-cs_0.8.2.orig.tar.gz
---
 cs.py    | 10 +++++++---
 setup.py |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/cs.py b/cs.py
index 4b6b1f5..091ed01 100644
--- a/cs.py
+++ b/cs.py
@@ -177,7 +177,9 @@ class CloudStack(object):
         return base64.b64encode(digest).decode('utf-8').strip()
 
 
-def read_config(ini_group='cloudstack'):
+def read_config(ini_group=None):
+    if not ini_group:
+        ini_group = os.environ.get('CLOUDSTACK_REGION', 'cloudstack')
     # Try env vars first
     os.environ.setdefault('CLOUDSTACK_METHOD', 'get')
     os.environ.setdefault('CLOUDSTACK_TIMEOUT', '10')
@@ -215,7 +217,8 @@ def main():
     parser = argparse.ArgumentParser(description='Cloustack client.')
     parser.add_argument('--region', metavar='REGION',
                         help='Cloudstack region in ~/.cloudstack.ini',
-                        default=os.environ.get('CLOUDSTACK_REGION', 'cloudstack'))
+                        default=os.environ.get('CLOUDSTACK_REGION',
+                                               'cloudstack'))
     parser.add_argument('--post', action='store_true', default=False,
                         help='use POST instead of GET')
     parser.add_argument('--async', action='store_true', default=False,
@@ -225,7 +228,8 @@ def main():
 
     def parse_option(x):
         if '=' not in x:
-            raise ValueError("{!r} is not a correctly formatted option".format(x))
+            raise ValueError("{!r} is not a correctly formatted "
+                             "option".format(x))
         return x.split('=', 1)
 
     parser.add_argument('arguments', metavar="OPTION=VALUE",
diff --git a/setup.py b/setup.py
index 99fd973..cf8785c 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ with open('README.rst', 'r') as f:
 
 setup(
     name='cs',
-    version='0.8.1',
+    version='0.8.2',
     url='https://github.com/exoscale/cs',
     license='BSD',
     author=u'Bruno Renié',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-cs.git



More information about the Python-modules-commits mailing list