1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_tk_fix.dpatch by Torsten Marek <shlomme@debian.org>
##
## DP: Handle missing Togl gracefully.
@DPATCH@
diff -urNad pyopengl-3.0.0~b3~/OpenGL/Tk/__init__.py pyopengl-3.0.0~b3/OpenGL/Tk/__init__.py
--- pyopengl-3.0.0~b3~/OpenGL/Tk/__init__.py 2007-02-07 19:02:45.000000000 +0100
+++ pyopengl-3.0.0~b3/OpenGL/Tk/__init__.py 2008-07-03 10:43:47.000000000 +0200
@@ -84,7 +84,11 @@
_default_root.tk.eval('load {} Togl')
except TclError:
pass
-_default_root.tk.call('package', 'require', 'Togl')
+try:
+ _default_root.tk.call('package', 'require', 'Togl')
+except TclError:
+ if _default_root:
+ _default_root.destroy()
# This code is needed to avoid faults on sys.exit()
# [DAA, Jan 1998]
|