From: Felix Schwarz Date: Mon, 20 Aug 2012 20:24:54 +0000 (+0000) Subject: raise exception if setuptools integration for init catalog uses both 'width' and... X-Git-Tag: 1.0~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3791628dba94a38571d0818aa1b3a049c216657d;p=thirdparty%2Fbabel.git raise exception if setuptools integration for init catalog uses both 'width' and 'no-wrap' parameter --- diff --git a/babel/messages/frontend.py b/babel/messages/frontend.py index 03de28cf..5c9b883c 100755 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -439,6 +439,9 @@ class init_catalog(Command): if not os.path.exists(os.path.dirname(self.output_file)): os.makedirs(os.path.dirname(self.output_file)) + if self.no_wrap and self.width: + raise DistutilsOptionError("'--no-wrap' and '--width' are mutually " + "exclusive") if not self.no_wrap and not self.width: self.width = 76 elif self.width is not None: