Changeset 1702

Show
Ignore:
Timestamp:
07/21/08 13:54:11 (20 months ago)
Author:
JensDiemer
Message:

bugfix: if no doc string exist

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/plugins_internal/preference_editor/preference_editor.py

    r1674 r1702  
    7979            form = unbound_form(data_dict) 
    8080 
     81        context = { 
     82            "plugin_name": unicode(plugin), 
     83            "form": form, 
     84            "url_abort": self.URLs.methodLink("select"), 
     85        } 
     86 
     87        # Insert DocString from preferences form, if exist 
    8188        raw_doc = unbound_form.__doc__ 
    8289        if raw_doc: 
    8390            doc = raw_doc.strip().splitlines() 
    84             doc = "\n".join([line.strip() for line in doc if line]) 
     91            context["doc"] = "\n".join([line.strip() for line in doc if line]) 
    8592 
    86         context = { 
    87             "plugin_name": unicode(plugin), 
    88             "doc": doc, 
    89             "form": form, 
    90             "url_abort": self.URLs.methodLink("select"), 
    91         } 
    9293        self._render_template("edit_form", context)#, debug=True) 
    9394