diff --git a/pronterface.py b/pronterface.py index 85bbccb..780432e 100755 --- a/pronterface.py +++ b/pronterface.py @@ -192,8 +192,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole): wx.CallAfter(self.pausebtn.Disable) wx.CallAfter(self.printbtn.SetLabel,_("Print")) - import shlex param = self.settings.final_command + if not param: + return + import shlex pararray=[i.replace("$s",str(self.filename)).replace("$t", format_time(int(time.time()-self.starttime+self.extra_print_time))).encode() for i in shlex.split(param.replace("\\","\\\\").encode())] self.finalp=subprocess.Popen(pararray,stderr=subprocess.STDOUT,stdout=subprocess.PIPE)