# HG changeset patch # User Pascal Volk # Date 1348420962 0 # Node ID 996bfcae49b062a839e2daab5099f93be5c5e95e # Parent 5882bfdf83e8a86feecf41cbb8a6089b38bd9e93 VMM/cli/main: Check if we have warnings before exiting. If so, print them and exit afterwards. diff -r 5882bfdf83e8 -r 996bfcae49b0 VirtualMailManager/cli/main.py --- a/VirtualMailManager/cli/main.py Sun Sep 16 17:09:45 2012 +0000 +++ b/VirtualMailManager/cli/main.py Sun Sep 23 17:22:42 2012 +0000 @@ -62,6 +62,8 @@ w_err(EX_USER_INTERRUPT, '', _(u'Ouch!'), '') except errors.VMMError, err: if err.code != DATABASE_ERROR: + if handler.has_warnings(): + w_err(0, _(u'Warnings:'), *handler.get_warnings()) w_err(err.code, _(u'Error: %s') % err.msg) w_err(err.code, unicode(err.msg, ENCODING, 'replace')) except (BadOptionError, ConfigValueError), err: