]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
raise exception if setuptools integration for init catalog uses both 'width' and...
authorFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Mon, 20 Aug 2012 20:24:54 +0000 (20:24 +0000)
committerFelix Schwarz <felix.schwarz@oss.schwarz.eu>
Mon, 20 Aug 2012 20:24:54 +0000 (20:24 +0000)
babel/messages/frontend.py

index 03de28cf49b68850dbda341730b2ee60f1ffd1ad..5c9b883c1cd9540ea95cd629ce940d4826a9ca4b 100755 (executable)
@@ -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: