[POS-commit] r1890 - stoqdrivers/trunk/stoqdrivers/devices/printers
Henrique Romano
henrique at async.com.br
Wed Dec 14 18:02:55 BRST 2005
Author: henrique
Date: Wed Dec 14 18:02:54 2005
New Revision: 1890
Modified:
stoqdrivers/trunk/stoqdrivers/devices/printers/base.py
Log:
Do not return the virtual printer through get_supported_printers, instead
the new function get_virtual_printer must be used.
Modified: stoqdrivers/trunk/stoqdrivers/devices/printers/base.py
==============================================================================
--- stoqdrivers/trunk/stoqdrivers/devices/printers/base.py (original)
+++ stoqdrivers/trunk/stoqdrivers/devices/printers/base.py Wed Dec 14 18:02:54 2005
@@ -82,6 +82,9 @@
raise TypeError("The driver %s doesn't implements a known "
"interface")
+def get_virtual_printer():
+ from stoqdrivers.devices.printers.fiscal import FiscalPrinter
+ return FiscalPrinter(brand='virtual', model='Simple')
def get_supported_printers():
printers_dir = os.path.dirname(printers.__file__)
@@ -89,8 +92,8 @@
for brand in os.listdir(printers_dir):
brand_dir = os.path.join(printers_dir, brand)
- if ((not os.path.isdir(brand_dir))
- or brand.startswith(".")):
+ if ((not os.path.isdir(brand_dir)) or brand.startswith(".")
+ or brand.startswith("virtual")):
continue
result[brand] = []
More information about the POS-commit
mailing list