Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2
FreeCAD
fix_unittestgui_tkinter_py3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_unittestgui_tkinter_py3.patch of Package FreeCAD
diff --git a/src/Mod/Test/unittestgui.py b/src/Mod/Test/unittestgui.py index 6e93079b8..e6125a694 100755 --- a/src/Mod/Test/unittestgui.py +++ b/src/Mod/Test/unittestgui.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 """ GUI framework and application for use with Python unit testing framework. Execute tests written using the framework provided by the 'unittest' module. @@ -29,12 +29,15 @@ __version__ = "$Revision: 2.0 $"[11:-2] import unittest import sys -import Tkinter -import tkMessageBox +if sys.version_info.major >= 3: + import tkinter as tk + from tkinter import messagebox as tkMessageBox +else: + import Tkinter as tk + import tkMessageBox import traceback import string -tk = Tkinter # Alternative to the messy 'from Tkinter import *' often seen ##############################################################################
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor