File: 03_tk_fix.dpatch

package info (click to toggle)
pyopengl 3.0.0~b6-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,696 kB
  • ctags: 26,182
  • sloc: python: 34,233; ansic: 70; sh: 26; makefile: 15
file content (22 lines) | stat: -rw-r--r-- 768 bytes parent folder | download
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]