|
1 | 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 | 5 | __docformat__ = "restructuredtext" |
6 | 6 |
|
@@ -353,6 +353,19 @@ def str2value(self, value): |
353 | 353 | except ValueError: |
354 | 354 | raise OptionValueError(self, value, "Integer number required") |
355 | 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) |
| 368 | + |
356 | 369 | class NullableOption(Option): |
357 | 370 |
|
358 | 371 | """Option that is set to None if it's string value is one of NULL strings |
@@ -466,6 +479,8 @@ class NullableFilePathOption(NullableOption, FilePathOption): |
466 | 479 | "Additional stop-words for the full-text indexer specific to\n" |
467 | 480 | "your tracker. See the indexer source for the default list of\n" |
468 | 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 | 485 | ("tracker", ( |
471 | 486 | (Option, "name", "Roundup issue tracker", |
|
0 commit comments