[meld/windows-fixes] Remove pseudo-Python-2 support for error display



commit 138c4c60fa9f5184f2cb2efbdfea68bf2e32d17f
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Aug 9 07:58:05 2022 +1000

    Remove pseudo-Python-2 support for error display

 bin/meld | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 79a61ad6..44672b82 100755
--- a/bin/meld
+++ b/bin/meld
@@ -24,7 +24,6 @@ import subprocess
 import sys
 from multiprocessing import freeze_support
 
-
 # On Windows, pythonw.exe (which doesn't display a console window) supplies
 # dummy stdout and stderr streams that silently throw away any output. However,
 # these streams seem to have issues with flush() so we just redirect stdout and
@@ -184,12 +183,8 @@ def show_error_and_exit(error_text):
         # tkinter is imported here only to show a UI warning about
         # missing dependencies.
         try:
-            if sys.version_info < (3, 0):
-                from Tkinter import Tk
-                from tkMessageBox import showerror
-            else:
-                from tkinter import Tk
-                from tkinter.messagebox import showerror
+            from tkinter import Tk
+            from tkinter.messagebox import showerror
             toplevel = Tk(className="Meld")
             toplevel.wait_visibility()
             showerror("Meld", error_text, parent=toplevel)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]