diff options
-rwxr-xr-x | isodumper | 2 | ||||
-rwxr-xr-x | lib/isodumper.py | 14 |
2 files changed, 11 insertions, 5 deletions
@@ -13,4 +13,4 @@ TERM=xterm DIR=/usr/lib/isodumper -$DIR/isodumper.py +$DIR/isodumper.py $1 diff --git a/lib/isodumper.py b/lib/isodumper.py index fb09476..17edf2c 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -56,10 +56,12 @@ def find_devices(): class IsoDumper: - def __init__(self): + def __init__(self, user): APP="isodumper" DIR="/usr/share/locale" RELEASE="v0.21" + # for the localisation of log file + self.user=user gettext.bindtextdomain(APP, DIR) gettext.textdomain(APP) @@ -341,8 +343,10 @@ class IsoDumper: def write_logfile(self): start = self.log.get_start_iter() end = self.log.get_end_iter() - from os.path import expanduser - home = expanduser("~") + if (self.user != 'root') and (self.user !=''): + home='/home/'+self.user + else: + home='/root' if not(os.path.isdir(home+'/.isodumper')): os.mkdir(home+'/.isodumper') logfile=open(home+'/.isodumper/isodumper.log',"w") @@ -379,5 +383,7 @@ class IsoDumper: #exit(0) if __name__ == "__main__": - app = IsoDumper() + import sys + user=sys.argv[1] + app = IsoDumper(user) gtk.main() |