about summary refs log tree commit diff
path: root/kcc.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-17 19:37:35 +0100
committerPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-17 19:37:35 +0100
commit66b867c1ca7d28d394a9312d07da01e4afd05724 (patch)
tree642e418c61201190fc23f981a8d44f021256566c /kcc.py
parentDrag & drop for OSX and Linux (diff)
downloadkcc-66b867c1ca7d28d394a9312d07da01e4afd05724.tar.gz
kcc-66b867c1ca7d28d394a9312d07da01e4afd05724.tar.bz2
kcc-66b867c1ca7d28d394a9312d07da01e4afd05724.zip
Various multi-os tweaks
Diffstat (limited to 'kcc.py')
-rw-r--r--kcc.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/kcc.py b/kcc.py
index 74a02e6..95f927e 100644
--- a/kcc.py
+++ b/kcc.py
@@ -48,12 +48,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
@@ -95,10 +99,6 @@ class QApplicationMessaging(QtWidgets.QApplication):
             self._server.newConnection.connect(self.handleMessage)
             self._server.listen(self._key)
 
-    def __del__(self):
-        if self._memory.isAttached():
-            self._memory.detach()
-
     def isRunning(self):
         return self._running