summaryrefslogtreecommitdiff
path: root/troveclient/compat
diff options
context:
space:
mode:
authorZhijunWei <wzj334965317@outlook.com>2018-12-28 23:04:46 +0800
committerZhijunWei <wzj334965317@outlook.com>2019-01-02 23:57:05 +0800
commit463eab47e4d47cb306333b705247d4bd37f12651 (patch)
treed1954f94f07ed4ffff53c7f1104ee318c4870505 /troveclient/compat
parentb4a38cdcc8eafda98f3b631e939174c756ead07a (diff)
downloadpython-troveclient-463eab47e4d47cb306333b705247d4bd37f12651.tar.gz
Update hacking version
1. update hacking version to latest 2. fix pep8 failed Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
Diffstat (limited to 'troveclient/compat')
-rw-r--r--troveclient/compat/cli.py7
-rw-r--r--troveclient/compat/mcli.py3
2 files changed, 4 insertions, 6 deletions
diff --git a/troveclient/compat/cli.py b/troveclient/compat/cli.py
index 86b3109..8d82ab7 100644
--- a/troveclient/compat/cli.py
+++ b/troveclient/compat/cli.py
@@ -21,6 +21,7 @@ Trove Command line tool
import os
import sys
+from troveclient.compat import common
# If ../trove/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
@@ -31,8 +32,6 @@ if os.path.exists(os.path.join(possible_topdir, 'troveclient',
'__init__.py')):
sys.path.insert(0, possible_topdir)
-from troveclient.compat import common
-
class InstanceCommands(common.AuthedCommandsBase):
"""Commands to perform various instance operations and actions."""
@@ -454,8 +453,8 @@ def main():
# Parse arguments
load_file = True
for index, arg in enumerate(sys.argv):
- if (arg == "auth" and len(sys.argv) > (index + 1)
- and sys.argv[index + 1] == "login"):
+ if (arg == "auth" and len(sys.argv) > (index + 1) and
+ sys.argv[index + 1] == "login"):
load_file = False
oparser = common.CliOptions.create_optparser(load_file)
diff --git a/troveclient/compat/mcli.py b/troveclient/compat/mcli.py
index 8dda4d0..e3efbae 100644
--- a/troveclient/compat/mcli.py
+++ b/troveclient/compat/mcli.py
@@ -22,6 +22,7 @@ import json
import os
import sys
+from troveclient.compat import common
# If ../trove/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
@@ -32,8 +33,6 @@ if os.path.exists(os.path.join(possible_topdir, 'troveclient.compat',
'__init__.py')):
sys.path.insert(0, possible_topdir)
-from troveclient.compat import common
-
oparser = None