From 66b867c1ca7d28d394a9312d07da01e4afd05724 Mon Sep 17 00:00:00 2001 From: Paweł Jastrzębski Date: Fri, 17 Jan 2014 19:37:35 +0100 Subject: Various multi-os tweaks --- kcc-c2p.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'kcc-c2p.py') diff --git a/kcc-c2p.py b/kcc-c2p.py index a8463d4..8b3feaa 100644 --- a/kcc-c2p.py +++ b/kcc-c2p.py @@ -33,12 +33,16 @@ try: except ImportError: missing.append('Pillow 2.3.0+') if len(missing) > 0: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') - import tkinter - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + try: + # noinspection PyUnresolvedReferences + import tkinter + # noinspection PyUnresolvedReferences + import tkinter.messagebox + importRoot = tkinter.Tk() + importRoot.withdraw() + tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') + except ImportError: + print('ERROR: ' + ', '.join(missing) + ' is not installed!') exit(1) import sys -- cgit 1.4.1