Skip to content

Commit 1743a1d

Browse files
author
Alexander Smishlajev
committed
NOSY_MESSAGES_TO_AUTHOR is RunDetectorOption (values: yes, no, new)...
rather than BooleanOption (yes/no); FilePathOptions have a comment about relative paths; add full stop at the end of all option descriptions
1 parent 3c8d2ab commit 1743a1d

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

roundup/configuration.py

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Roundup Issue Tracker configuration support
22
#
3-
# $Id: configuration.py,v 1.9 2004-07-26 05:59:45 a1s Exp $
3+
# $Id: configuration.py,v 1.10 2004-07-26 09:13:17 a1s Exp $
44
#
55
__docformat__ = "restructuredtext"
66

@@ -296,6 +296,9 @@ class FilePathOption(Option):
296296
297297
"""
298298

299+
class_description = "The path may be either absolute" \
300+
" or relative to the tracker home."
301+
299302
def get(self):
300303
_val = Option.get(self)
301304
if _val and not os.path.isabs(_val):
@@ -366,9 +369,10 @@ def _value2str(self, value):
366369

367370
class NullableFilePathOption(NullableOption, FilePathOption):
368371

369-
# .get() is from FilePathOption,
372+
# .get() and class_description are from FilePathOption,
370373
get = FilePathOption.get
371-
# everything else - from NullableOption (inheritance order)
374+
class_description = FilePathOption.class_description
375+
# everything else taken from NullableOption (inheritance order)
372376

373377
### Main configuration layout.
374378
# Config is described as a sequence of sections,
@@ -381,12 +385,12 @@ class NullableFilePathOption(NullableOption, FilePathOption):
381385
# compatibility - new options should *not* have aliases!
382386
SETTINGS = (
383387
("main", (
384-
(FilePathOption, "database", "db", "Database directory path"),
388+
(FilePathOption, "database", "db", "Database directory path."),
385389
(FilePathOption, "templates", "html",
386-
"Path to the HTML templates directory"),
390+
"Path to the HTML templates directory."),
387391
(MailAddressOption, "admin_email", "roundup-admin",
388392
"Email address that roundup will complain to"
389-
" if it runs into trouble"),
393+
" if it runs into trouble."),
390394
(MailAddressOption, "dispatcher_email", "roundup-admin",
391395
"The 'dispatcher' is a role that can get notified\n"
392396
"of new items to the database.\n"
@@ -400,14 +404,14 @@ class NullableFilePathOption(NullableOption, FilePathOption):
400404
"\"Foo Bar EMAIL_FROM_TAG\" <[email protected]>"),
401405
(Option, "new_web_user_roles", "User",
402406
"Roles that a user gets when they register"
403-
" with Web User Interface\n"
407+
" with Web User Interface.\n"
404408
"This is a comma-separated string of role names"
405-
" (e.g. 'Admin,User')"),
409+
" (e.g. 'Admin,User')."),
406410
(Option, "new_email_user_roles", "User",
407411
"Roles that a user gets when they register"
408-
" with Email Gateway\n"
412+
" with Email Gateway.\n"
409413
"This is a comma-separated string of role names"
410-
" (e.g. 'Admin,User')"),
414+
" (e.g. 'Admin,User')."),
411415
(Option, "error_messages_to", "user",
412416
# XXX This description needs better wording,
413417
# with explicit allowed values list.
@@ -429,7 +433,7 @@ class NullableFilePathOption(NullableOption, FilePathOption):
429433
)),
430434
("tracker", (
431435
(Option, "name", "Roundup issue tracker",
432-
"A descriptive name for your roundup instance"),
436+
"A descriptive name for your roundup instance."),
433437
(Option, "web", NODEFAULT,
434438
"The web address that the tracker is viewable at.\n"
435439
"This will be included in information"
@@ -438,7 +442,7 @@ class NullableFilePathOption(NullableOption, FilePathOption):
438442
"that is required to get to the home page of the tracker.\n"
439443
"You MUST include a trailing '/' in the URL."),
440444
(MailAddressOption, "email", "issue_tracker",
441-
"Email address that mail to roundup should go to"),
445+
"Email address that mail to roundup should go to."),
442446
)),
443447
("logging", (
444448
(FilePathOption, "config", "",
@@ -459,26 +463,26 @@ class NullableFilePathOption(NullableOption, FilePathOption):
459463
(Option, "domain", NODEFAULT, "Domain name used for email addresses."),
460464
(Option, "host", NODEFAULT,
461465
"SMTP mail host that roundup will use to send mail"),
462-
(Option, "username", "", "SMTP login name\n"
466+
(Option, "username", "", "SMTP login name.\n"
463467
"Set this if your mail host requires authenticated access.\n"
464468
"If username is not empty, password (below) MUST be set!"),
465-
(Option, "password", NODEFAULT, "SMTP login password\n"
469+
(Option, "password", NODEFAULT, "SMTP login password.\n"
466470
"Set this if your mail host requires authenticated access."),
467471
(BooleanOption, "tls", "no",
468472
"If your SMTP mail host provides or requires TLS\n"
469-
"(Transport Layer Security) then set this option to 'yes'"),
473+
"(Transport Layer Security) then set this option to 'yes'."),
470474
(NullableFilePathOption, "tls_keyfile", "",
471475
"If TLS is used, you may set this option to the name\n"
472-
"of a PEM formatted file that contains your private key"),
476+
"of a PEM formatted file that contains your private key."),
473477
(NullableFilePathOption, "tls_certfile", "",
474478
"If TLS is used, you may set this option to the name\n"
475-
"of a PEM formatted certificate chain file"),
479+
"of a PEM formatted certificate chain file."),
476480
(Option, "charset", "utf-8",
477481
"Character set to encode email headers with.\n"
478482
"We use utf-8 by default, as it's the most flexible.\n"
479483
"Some mail readers (eg. Eudora) can't cope with that,\n"
480484
"so you might need to specify a more limited character set\n"
481-
"(eg. iso-8859-1)",
485+
"(eg. iso-8859-1).",
482486
["EMAIL_CHARSET"]),
483487
(FilePathOption, "debug", "",
484488
"Setting this option makes Roundup to write all outgoing email\n"
@@ -504,11 +508,11 @@ class NullableFilePathOption(NullableOption, FilePathOption):
504508
["MAIL_DEFAULT_CLASS"]),
505509
)),
506510
("nosy", (
507-
(BooleanOption, "messages_to_author", "no",
508-
"Send nosy messages to the author of the message",
511+
(RunDetectorOption, "messages_to_author", "no",
512+
"Send nosy messages to the author of the message.",
509513
["MESSAGES_TO_AUTHOR"]),
510514
(Option, "signature_position", "bottom",
511-
"Where to place the email signature\n"
515+
"Where to place the email signature.\n"
512516
"Allowed values: top, bottom, none",
513517
["EMAIL_SIGNATURE_POSITION"]),
514518
(RunDetectorOption, "add_author", "new",

0 commit comments

Comments
 (0)