comparison babel/messages/frontend.py @ 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
comparison
equal deleted inserted replaced
600:e61e27d9347d 601:3eeaadb290be
437 self.output_file = os.path.join(self.output_dir, self.locale, 437 self.output_file = os.path.join(self.output_dir, self.locale,
438 'LC_MESSAGES', self.domain + '.po') 438 'LC_MESSAGES', self.domain + '.po')
439 439
440 if not os.path.exists(os.path.dirname(self.output_file)): 440 if not os.path.exists(os.path.dirname(self.output_file)):
441 os.makedirs(os.path.dirname(self.output_file)) 441 os.makedirs(os.path.dirname(self.output_file))
442 if self.no_wrap and self.width:
443 raise DistutilsOptionError("'--no-wrap' and '--width' are mutually "
444 "exclusive")
442 if not self.no_wrap and not self.width: 445 if not self.no_wrap and not self.width:
443 self.width = 76 446 self.width = 76
444 elif self.width is not None: 447 elif self.width is not None:
445 self.width = int(self.width) 448 self.width = int(self.width)
446 449
Copyright (C) 2012-2017 Edgewall Software