chiark / gitweb /
Change how the engine is interfaced from the python code. Put the GCode viewer in...
[cura.git] / Cura / gui / app.py
index dffa855ebbdef70fa711efba10f7b0ef5232511e..47932c60c5e163b1415a7f1536cd9a15ba8af560 100644 (file)
@@ -63,11 +63,14 @@ class CuraApp(wx.App):
 
        def Win32SocketListener(self, port):
                import socket
-               sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-               sock.bind(("127.0.0.1", port))
-               while True:
-                       data, addr = sock.recvfrom(2048)
-                       self.mainWindow.OnDropFiles(data.split('\0'))
+               try:
+                       sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+                       sock.bind(("127.0.0.1", port))
+                       while True:
+                               data, addr = sock.recvfrom(2048)
+                               self.mainWindow.OnDropFiles(data.split('\0'))
+               except:
+                       pass
 
        def afterSplashCallback(self):
                #These imports take most of the time and thus should be done after showing the splashscreen