mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[FIX] base_report_to_printer: Switch error type
* Prefer UserError to Warning
This commit is contained in:
committed by
Graeme Gellatly
parent
0eb3e703d7
commit
f89fe7fd97
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user