summaryrefslogtreecommitdiff
path: root/packages/python/python-traits
diff options
context:
space:
mode:
authorAndrew Straw <strawman@astraw.com>2008-11-27 16:24:34 -0800
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2008-12-09 14:30:06 +0100
commit60d98775a2304141dc4fd8aef494a9e2bfae8285 (patch)
tree014a21164de53288746f3ce986c8ca8bff1cc2a7 /packages/python/python-traits
parentc98bb8f4a7738a3ffbc05fd7a44a61ce7672d1b4 (diff)
python-traits: new recipe; explicitly typed attributes for Python
Signed-off-by: Andrew Straw <strawman@astraw.com>
Diffstat (limited to 'packages/python/python-traits')
-rw-r--r--packages/python/python-traits/fix-import-pyface.diff26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/python/python-traits/fix-import-pyface.diff b/packages/python/python-traits/fix-import-pyface.diff
new file mode 100644
index 0000000000..969a18ef30
--- /dev/null
+++ b/packages/python/python-traits/fix-import-pyface.diff
@@ -0,0 +1,26 @@
+diff -r -u Traits-3.0.2.orig/enthought/traits/ui/ui_traits.py Traits-3.0.2/enthought/traits/ui/ui_traits.py
+--- Traits-3.0.2.orig/enthought/traits/ui/ui_traits.py 2008-09-15 13:15:58.000000000 -0700
++++ Traits-3.0.2/enthought/traits/ui/ui_traits.py 2008-11-27 14:55:05.000000000 -0800
+@@ -147,8 +147,6 @@
+ """
+ global image_resource_cache
+
+- from enthought.pyface.image_resource import ImageResource
+-
+ if not isinstance( value, basestring ):
+ return value
+
+@@ -168,7 +166,12 @@
+ except:
+ result = None
+ else:
+- result = ImageResource( value, search_path = [ search_path ] )
++ try:
++ from enthought.pyface.image_resource import ImageResource
++ except ImportError:
++ result = None
++ else:
++ result = ImageResource( value, search_path = [ search_path ] )
+
+ image_resource_cache[ key ] = result
+