Remove image after printing for brother-ql
This commit is contained in:
1 parent
ba7e854a6f
commit
9830917b1a
1 file changed
+8
-3
+8
-3
@@ -291,12 +291,11 @@ class EscPosPrinter(Printer):
|
||||
try:
|
||||
os.remove(path)
|
||||
os.remove(processed_path)
|
||||
self.app.logger.debug("Removed image : " + str(processed_path))
|
||||
self.app.logger.debug("Removed image : " + str(path))
|
||||
except OSError as e:
|
||||
raise e
|
||||
|
||||
self.app.logger.debug("Removed image : " + str(processed_path))
|
||||
self.app.logger.debug("Removed image : " + str(path))
|
||||
|
||||
try:
|
||||
self.printer.close()
|
||||
except Exception as e:
|
||||
@@ -500,6 +499,12 @@ class BrotherPrinter(Printer):
|
||||
del be
|
||||
except Exception as e:
|
||||
raise e
|
||||
finally:
|
||||
try:
|
||||
os.remove(processed_path)
|
||||
self.app.logger.debug("Removed image : " + str(processed_path))
|
||||
except OSError as e:
|
||||
raise e
|
||||
|
||||
if signature != "":
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user