Added file deletion after printing.

This commit is contained in:
n07070 2022-05-15 23:48:44 +02:00
parent 277ff32b5d
commit 4ced780d54

View File

@ -171,6 +171,8 @@ class Printer(object):
self.printer.cut()
self.printer.close()
self.app.logger.debug("Printed an image : " + str(path))
os.remove(path)
self.app.logger.debug("Removed image.")
return True
except Exception as e:
self.printer.close()