Skip to content

Commit

Permalink
Handle tkinter importerror for tkinter-less distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Feb 21, 2020
1 parent b13aee2 commit 892ddbb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sciunit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
try:
import Tkinter as tkinter
except ImportError:
tkinter = None # Handled in the importing modules's fix_display()
tkinter = None
FileNotFoundError = OSError
json.JSONDecodeError = ValueError
else:
from io import StringIO
import tkinter
try:
import tkinter
except ImportError:
tkinter = None
FileNotFoundError = FileNotFoundError

KERNEL = ('ipykernel' in sys.modules)
Expand Down

0 comments on commit 892ddbb

Please sign in to comment.