printrun-src/printrun/pronsole.py

changeset 39
74801c0f2709
parent 38
700241b53fe7
child 46
cce0af6351f0
equal deleted inserted replaced
38:700241b53fe7 39:74801c0f2709
1167 {"$s": str(self.filename), 1167 {"$s": str(self.filename),
1168 "$t": format_time(time.time())}) 1168 "$t": format_time(time.time())})
1169 if output: 1169 if output:
1170 self.log("Start command output:") 1170 self.log("Start command output:")
1171 self.log(output.rstrip()) 1171 self.log(output.rstrip())
1172 #try: 1172 try:
1173 # powerset_print_start(reason = "Preventing sleep during print") 1173 powerset_print_start(reason = "Preventing sleep during print")
1174 #except: 1174 except:
1175 # self.logError(_("Failed to set power settings:") 1175 self.logError(_("Failed to set power settings:")
1176 # + "\n" + traceback.format_exc()) 1176 + "\n" + traceback.format_exc())
1177 1177
1178 def endcb(self): 1178 def endcb(self):
1179 #try: 1179 try:
1180 # powerset_print_stop() 1180 powerset_print_stop()
1181 #except: 1181 except:
1182 # self.logError(_("Failed to set power settings:") 1182 self.logError(_("Failed to set power settings:")
1183 # + "\n" + traceback.format_exc()) 1183 + "\n" + traceback.format_exc())
1184 if self.p.queueindex == 0: 1184 if self.p.queueindex == 0:
1185 print_duration = int(time.time() - self.starttime + self.extra_print_time) 1185 print_duration = int(time.time() - self.starttime + self.extra_print_time)
1186 self.log(_("Print ended at: %(end_time)s and took %(duration)s") % {"end_time": format_time(time.time()), 1186 self.log(_("Print ended at: %(end_time)s and took %(duration)s") % {"end_time": format_time(time.time()),
1187 "duration": format_duration(print_duration)}) 1187 "duration": format_duration(print_duration)})
1188 1188

mercurial