From c769c5ddf6f66a14db48d7691163994caa8c346e Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 8 May 2013 03:14:00 +0200 Subject: bin/hostinfo: fix local lib import --- bin/hostinfo | 6 ++++-- 1 file 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 -- cgit v1.2.3-1-g7c22