diff options
-rwxr-xr-x | bin/hostinfo | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/hostinfo b/bin/hostinfo index 11356c4..acf711c 100755 --- a/bin/hostinfo +++ b/bin/hostinfo @@ -7,8 +7,10 @@ import yaml import os.path from dns import resolver,reversename -if os.path.exists(os.path.join(os.path.dirname(__file__), '..', 'hostinfo')): - sys.path = ['..'] + sys.path +own_directory = os.path.dirname(os.path.abspath(__file__)) +lib = os.path.join(own_directory, '..') +if os.path.exists(os.path.join(lib, 'hostinfo')): + sys.path = [lib] + sys.path from hostinfo import printer |