Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2015-09-02 08:06:48 +0300
committerCasey Deccio <casey@deccio.net>2015-09-02 08:06:48 +0300
commit19e5c7f137f764e97de9b33baa1ee42c8362be4c (patch)
tree51b404df7bda57be11729eb38c081f6fbbc16481 /bin
parent0351370b69ffa9ec2f6e8edea8adc1ab4d361682 (diff)
Update script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dnsviz15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/dnsviz b/bin/dnsviz
index aa422bb..614d1d7 100755
--- a/bin/dnsviz
+++ b/bin/dnsviz
@@ -44,14 +44,25 @@ def main():
usage()
sys.exit(0)
- command = sys.argv[1]
+ if sys.argv[1] == 'help':
+ if len(sys.argv) < 3:
+ usage()
+ sys.exit(0)
+
+ command = sys.argv[2]
+ else:
+ command = sys.argv[1]
+
try:
mod = importlib.import_module('dnsviz.commands.%s' % command)
except ImportError:
usage('Invalid command: %s' % command)
sys.exit(1)
- mod.main(sys.argv[1:])
+ if sys.argv[1] == 'help':
+ mod.usage()
+ else:
+ mod.main(sys.argv[1:])
if __name__ == "__main__":
main()