Fix syntax

This commit is contained in:
Ramon Poca 2018-12-31 13:57:53 +01:00
parent d5b9d99093
commit 73fff6291d
1 changed files with 13 additions and 16 deletions

View File

@ -353,7 +353,6 @@ if _WIN32PRINT:
self.printer_name = win32print.GetDefaultPrinter() self.printer_name = win32print.GetDefaultPrinter()
self.hPrinter = None self.hPrinter = None
def open(self, job_name="python-escpos"): def open(self, job_name="python-escpos"):
if self.printer_name is None: if self.printer_name is None:
raise Exception("Printer not found") raise Exception("Printer not found")
@ -380,5 +379,3 @@ if _WIN32PRINT:
if self.hPrinter is None: if self.hPrinter is None:
raise Exception("Printer job not opened") raise Exception("Printer job not opened")
win32print.WritePrinter(self.hPrinter, msg) win32print.WritePrinter(self.hPrinter, msg)