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
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2016-02-16 19:00:02 +0300
committerCasey Deccio <casey@deccio.net>2016-02-16 19:00:02 +0300
commit5ce538e18aa13d1005c4a567d20b83dbeb3ef414 (patch)
tree42575fef660b3e4aaa93f7d8989b7a47098a9720 /contrib
parentf03cada968f399d1e730db2eeee19cfa24c89b29 (diff)
Check for required argument
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/digviz4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/digviz b/contrib/digviz
index 08d2914..8828f07 100755
--- a/contrib/digviz
+++ b/contrib/digviz
@@ -257,6 +257,8 @@ class DigCommandLineQuery:
(len(arg) <= 12 or arg[12] == '='):
try:
opt, arg = arg.split('=')
+ if not arg:
+ raise ValueError()
except ValueError:
raise CommandLineException('+trusted-key requires a filename argument.')
else:
@@ -276,6 +278,8 @@ class DigCommandLineQuery:
(len(arg) <= 3 or arg[3] == '='):
try:
opt, arg = arg.split('=')
+ if not arg:
+ raise ValueError()
except ValueError:
raise CommandLineException('+lg requires a filename argument.')
else: