[Twisted-web] defaultLabel formless
Andrea Arcangeli
andrea at cpushare.com
Wed Jan 12 20:26:57 MST 2005
I noticed a minor regression in svn (defaultLabel got lost because it
was set to the action string fallback), here the fix (optimizes the new
code a little bit too).
Index: formless/annotate.py
===================================================================
--- formless/annotate.py (revision 1070)
+++ formless/annotate.py (working copy)
@@ -732,10 +732,9 @@
if description is None:
description = adapted.description
- defaultLabel, defaultDescription = labelAndDescriptionFromNameAndDocstring(key, value.__doc__)
- if label is None:
+ if value.__doc__ is not None:
+ defaultLabel, defaultDescription = labelAndDescriptionFromNameAndDocstring(key, value.__doc__)
label = defaultLabel
- if description is None:
description = defaultDescription
theMethod = Method(
More information about the Twisted-web
mailing list