VMM/cli/main: Check if we have warnings before exiting.
If so, print them and exit afterwards.
--- 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: