diff options
author | termie <github@anarkystic.com> | 2012-01-17 16:05:31 -0800 |
---|---|---|
committer | termie <github@anarkystic.com> | 2012-01-17 16:05:31 -0800 |
commit | 76c45b4791275daccff7545f677684fa9a695431 (patch) | |
tree | 2bcf403f244ffdb8d14e709972de6156e97dd510 /bin | |
parent | 3c10e730839bb313ad33228eb56afcd3a8e55bc1 (diff) | |
download | keystone-76c45b4791275daccff7545f677684fa9a695431.tar.gz keystone-76c45b4791275daccff7545f677684fa9a695431.tar.xz keystone-76c45b4791275daccff7545f677684fa9a695431.zip |
make a main in keystone-manage
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/keystone-manage | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/keystone-manage b/bin/keystone-manage index 310b5bfa..63c1aac1 100755 --- a/bin/keystone-manage +++ b/bin/keystone-manage @@ -131,7 +131,10 @@ CMDS = {'db_sync': DbSync, } -if __name__ == '__main__': +def main(argv=None): + if argv is None: + argv = sys.argv + dev_conf = os.path.join(possible_topdir, 'etc', 'keystone.conf') @@ -139,7 +142,11 @@ if __name__ == '__main__': if os.path.exists(dev_conf): config_files = [dev_conf] - args = CONF(config_files=config_files, args=sys.argv) + args = CONF(config_files=config_files, args=argv) cmd = args[1] if cmd in CMDS: CMDS[cmd](argv=(args[:1] + args[2:])).run() + + +if __name__ == '__main__': + main() |