[POS-commit] r1241 - fiscalprinter/trunk/fiscalprinter
Henrique Romano
henrique at async.com.br
Tue Sep 20 15:18:46 BRT 2005
Author: henrique
Date: Tue Sep 20 15:18:45 2005
New Revision: 1241
Modified:
fiscalprinter/trunk/fiscalprinter/printer.py
Log:
When catching a ImportError, print the reason why the module can not be
imported.
Modified: fiscalprinter/trunk/fiscalprinter/printer.py
==============================================================================
--- fiscalprinter/trunk/fiscalprinter/printer.py (original)
+++ fiscalprinter/trunk/fiscalprinter/printer.py Tue Sep 20 15:18:45 2005
@@ -75,8 +75,9 @@
name = 'fiscalprinter.drivers.%s.%s' % (brand, model)
try:
module = __import__(name, None, None, 'fiscalprinter')
- except ImportError:
- raise CriticalError("Could not load driver: %s" % model)
+ except ImportError, reason:
+ raise CriticalError("Could not load driver %s: %s"
+ % (model, reason))
class_name = model + 'Printer'
More information about the POS-commit
mailing list