# HG changeset patch # User fschwarz # Date 1345494294 0 # Node ID 3eeaadb290be8837ef2a978ac868763715b189a8 # Parent e61e27d9347df3307804dbcd13808a4b604c98e2 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 --- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -439,6 +439,9 @@ 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: