[FIX] base_report_to_printer: Switch error type

* Prefer UserError to Warning
This commit is contained in:
Dave Lasley
2016-07-13 09:06:05 -07:00
committed by Graeme Gellatly
parent 0eb3e703d7
commit f89fe7fd97

View File

@@ -7,7 +7,7 @@
import logging
from openerp.exceptions import Warning
from openerp.exceptions import UserError
from openerp import models, api, _
from ..models.printing_printer import CUPS_HOST, CUPS_PORT
@@ -36,7 +36,7 @@ class PrintingPrinterUpdateWizard(models.TransientModel):
printers = connection.getPrinters()
_logger.info('Printers found: %s' % ','.join(printers.keys()))
except:
raise Warning(
raise UserError(
_('Could not get the list of printers from the CUPS server '
'(%s:%s)') % (CUPS_HOST, CUPS_PORT))