Skip to content

Commit

Permalink
[FIX] base_report_to_printer: Switch error type
Browse files Browse the repository at this point in the history
* Prefer UserError to Warning
  • Loading branch information
lasley committed Jul 13, 2016
1 parent 10bfbe6 commit b2cde5d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -36,7 +36,7 @@ def action_ok(self):
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))

Expand Down

0 comments on commit b2cde5d

Please sign in to comment.