changeset 601:3eeaadb290be trunk

raise exception if setuptools integration for init catalog uses both 'width' and 'no-wrap' parameter
author fschwarz
date Mon, 20 Aug 2012 20:24:54 +0000
parents e61e27d9347d
children 7a8ee579f31e
files babel/messages/frontend.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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:
Copyright (C) 2012-2017 Edgewall Software