Commit 1581c12f authored by Guillaume Seguin's avatar Guillaume Seguin

Only run final command if one is set

parent 17e84364
...@@ -192,8 +192,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment