summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-05-08 03:14:00 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-05-08 03:14:00 +0200
commitc769c5ddf6f66a14db48d7691163994caa8c346e (patch)
tree21c61256b90124519e869c39be9912b4ff252b4f
parent81ad82a21a407bd2df5b4c03fad3fff2515f38c2 (diff)
downloadtools-c769c5ddf6f66a14db48d7691163994caa8c346e.tar.gz
tools-c769c5ddf6f66a14db48d7691163994caa8c346e.tar.bz2
tools-c769c5ddf6f66a14db48d7691163994caa8c346e.zip
bin/hostinfo: fix local lib import
-rwxr-xr-xbin/hostinfo6
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