File: avoiding_module_no_object_on_tkinter.patch

package info (click to toggle)
python-tktreectrl 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 628 kB
  • sloc: python: 3,062; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Author: Steffen Moeller
Last-Update: 2016-05-11
Description: A package tkinter without the _support_default_root variable
 was loaded instead of tkinter and caused a run-time crash.

--- tktreectrl-2.0.1.orig/TkTreectrl/Treectrl.py
+++ tktreectrl-2.0.1/TkTreectrl/Treectrl.py
@@ -15,9 +15,11 @@
 #                        - weiter mit header methoden
 
 try:
-    import tkinter
-except ImportError:
+    # Python 2, which may also find a dysfunctional tkinter package
     import Tkinter as tkinter
+except ImportError:
+    # Python 3
+    import tkinter
 
 class TreectrlEvent:
     '''Container for the properties of an event.