Only run final command if one is set
parent
17e8436436
commit
1581c12f8e
|
@ -192,8 +192,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
|
||||||
wx.CallAfter(self.pausebtn.Disable)
|
wx.CallAfter(self.pausebtn.Disable)
|
||||||
wx.CallAfter(self.printbtn.SetLabel,_("Print"))
|
wx.CallAfter(self.printbtn.SetLabel,_("Print"))
|
||||||
|
|
||||||
import shlex
|
|
||||||
param = self.settings.final_command
|
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())]
|
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)
|
self.finalp=subprocess.Popen(pararray,stderr=subprocess.STDOUT,stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue