Skip to content

Commit 79b3496

Browse files
committed
Add specific error message if tkinter is not installed
1 parent e22ccdc commit 79b3496

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

configure.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@
3535
try:
3636
import tkinter.ttk as ttk
3737
from tkinter import *
38+
except:
39+
print(
40+
"[ERROR] Tkinter dependency not installed. Please follow troubleshooting page: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Troubleshooting#all-os-tkinter-dependency-not-installed")
41+
try:
42+
sys.exit(0)
43+
except:
44+
os._exit(0)
3845

46+
try:
3947
import psutil
4048
import ruamel.yaml
4149
import sv_ttk

theme-editor.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@
2727
import subprocess
2828
import sys
2929
import time
30-
import tkinter
30+
31+
try:
32+
import tkinter
33+
except:
34+
print(
35+
"[ERROR] Tkinter dependency not installed. Please follow troubleshooting page: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Troubleshooting#all-os-tkinter-dependency-not-installed")
36+
try:
37+
sys.exit(0)
38+
except:
39+
os._exit(0)
3140

3241
MIN_PYTHON = (3, 7)
3342
if sys.version_info < MIN_PYTHON:

0 commit comments

Comments
 (0)