Default namespace for args options

added default namespace when the client is initialize from another project

Change-Id: Iafcce51720788a17573461c8fff3a21a0e8f5bb0
changes/36/296436/1
memo 2015-09-01 13:19:39 +01:00
parent f9b3146a13
commit 7d5792cfe0
1 changed files with 2 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class Client(object):
self.opts = opts or build_os_option_parser(
argparse.ArgumentParser(description='Freezer Client')
).parse_args()
).parse_known_args()[0]
if token:
self.opts.os_token = token
if username:
@ -196,6 +196,7 @@ class Client(object):
self.opts.os_auth_url = auth_url
if endpoint:
self.opts.os_backup_url = endpoint
self._session = session
self.version = version