1. Ralph Bean
  2. tw2.dyntext

Commits

megamahi  committed 9307ba0

Added exceptions

  • Participants
  • Parent commits fe5f2f2
  • Branches default

Comments (0)

Files changed (1)

File tw2/dyntext/widgets.py

View file
  • Ignore whitespace
 
     def prepare(self):
         if self.data_url is None:
-            raise ValueError, "data_url must be a string"
+            raise ValueError, "DynamicTextWidget data_url parameter must be set"
+        elif 'str' not in str(type(self.data_url)):
+            raise ValueError, "DynamicTextWidget data_url parameter must be a string"
 
         super(DynamicTextWidget, self).prepare()
         # put code here to run just before the widget is displayed