Fix (I hope) template program_text retrieval when not running from source

This commit is contained in:
Charles Haley 2011-04-27 21:49:28 +01:00
parent e8592b2f90
commit 1bfe6b06d7

View File

@ -186,7 +186,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.argument_count.setValue(func.arg_count)
self.documentation.setText(func.doc)
if txt in self.builtins:
if hasattr(func, 'program_text'):
if hasattr(func, 'program_text') and func.program_text:
self.program.setPlainText(func.program_text)
elif txt in self.builtin_source_dict:
self.program.setPlainText(self.builtin_source_dict[txt])