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-10-14 00:36:27 +0300
committerCasey Deccio <casey@deccio.net>2015-10-14 00:36:27 +0300
commit4bb9b6f3d13f501ff25dba8f5e8cc5b996208305 (patch)
tree90f5ee91f78fddf6e918c8276789f25163f21261 /bin
parent6b18b73488607b322c151187eb085b0c804318e5 (diff)
Add more robustness to command detection
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dnsviz5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/dnsviz b/bin/dnsviz
index 00fa75b..9d10a33 100755
--- a/bin/dnsviz
+++ b/bin/dnsviz
@@ -53,6 +53,11 @@ def main():
else:
command = sys.argv[1]
+ # first try importing just the commands module to make sure
+ # dnsviz is properly reachable with the current path
+ import dnsviz.commands
+
+ # now try importing the module for the actual command
try:
mod = importlib.import_module('dnsviz.commands.%s' % command)
except ImportError: