comparison roundup/configuration.py @ 3609:f2fda3e6fc8b

umask is now configurable (with the same 0002 default)
author Richard Jones <richard@users.sourceforge.net>
date Thu, 27 Apr 2006 04:59:37 +0000
parents 61d48244e7a8
children 17124caa2491
comparison
equal deleted inserted replaced
3608:19c0ee158c29 3609:f2fda3e6fc8b
1 # Roundup Issue Tracker configuration support 1 # Roundup Issue Tracker configuration support
2 # 2 #
3 # $Id: configuration.py,v 1.33 2006-02-08 03:47:28 richard Exp $ 3 # $Id: configuration.py,v 1.34 2006-04-27 04:59:37 richard Exp $
4 # 4 #
5 __docformat__ = "restructuredtext" 5 __docformat__ = "restructuredtext"
6 6
7 import getopt 7 import getopt
8 import imp 8 import imp
350 def str2value(self, value): 350 def str2value(self, value):
351 try: 351 try:
352 return int(value) 352 return int(value)
353 except ValueError: 353 except ValueError:
354 raise OptionValueError(self, value, "Integer number required") 354 raise OptionValueError(self, value, "Integer number required")
355
356 class OctalNumberOption(Option):
357
358 """Octal Integer numbers"""
359
360 def str2value(self, value):
361 try:
362 return int(value, 8)
363 except ValueError:
364 raise OptionValueError(self, value, "Octal Integer number required")
365
366 def _value2str(self, value):
367 return oct(value)
355 368
356 class NullableOption(Option): 369 class NullableOption(Option):
357 370
358 """Option that is set to None if it's string value is one of NULL strings 371 """Option that is set to None if it's string value is one of NULL strings
359 372
464 "Offer registration confirmation by email or only through the web?"), 477 "Offer registration confirmation by email or only through the web?"),
465 (WordListOption, "indexer_stopwords", "", 478 (WordListOption, "indexer_stopwords", "",
466 "Additional stop-words for the full-text indexer specific to\n" 479 "Additional stop-words for the full-text indexer specific to\n"
467 "your tracker. See the indexer source for the default list of\n" 480 "your tracker. See the indexer source for the default list of\n"
468 "stop-words (eg. A,AND,ARE,AS,AT,BE,BUT,BY, ...)"), 481 "stop-words (eg. A,AND,ARE,AS,AT,BE,BUT,BY, ...)"),
482 (OctalNumberOption, "umask", "02",
483 "Defines the file creation mode mask."),
469 )), 484 )),
470 ("tracker", ( 485 ("tracker", (
471 (Option, "name", "Roundup issue tracker", 486 (Option, "name", "Roundup issue tracker",
472 "A descriptive name for your roundup instance."), 487 "A descriptive name for your roundup instance."),
473 (Option, "web", NODEFAULT, 488 (Option, "web", NODEFAULT,

Roundup Issue Tracker: http://roundup-tracker.org/