Commits

Miki Tebeka  committed 1ee2413

History works again

  • Participants
  • Parent commits 7cac721

Comments (0)

Files changed (1)

             raise ValueError("can't find %s" % name)
 
     if is_executable(fullname):
-        system("\"%s\" %s&" % (fullname, args))
+        cmd = "\"%s\" %s&" % (fullname, args)
     else:
-        system("start \"%s\"" % fullname)
+        cmd = "start \"%s\"" % fullname
+
+    if system(cmd) != 0:
+        raise ValueError
 
 class TLL:
     def __init__(self):
 
         try:
             launch(command, args, self.aliases)
+            self.history.update(line)
         except ValueError:
             showerror("TLL Error", "Can't run %s" % command)
             return
         root.geometry('+%d+%d' % (x, y))
 
     def quit(self):
+        self.history.save()
         self.timer.cancel()
         self.root.quit()