Remove image after printing for brother-ql
This commit is contained in:
@@ -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