aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pycrctrl.pyp (renamed from pycrctrl.py)25
1 files changed, 13 insertions, 12 deletions
diff --git a/pycrctrl.py b/pycrctrl.pyp
index 23d9bbc..3ee429b 100644
--- a/pycrctrl.py
+++ b/pycrctrl.pyp
@@ -273,18 +273,19 @@ class PyCRCtrl:
self.clonk.stdin.close()
except Exception as e:
- #if self.clonk and __debug__ and not self.clonk.stdin.closed:
- # self.writeToServer(b"Fehler:")
+#ifdef DEBUG
+ if self.clonk and __debug__ and not self.clonk.stdin.closed:
+ self.writeToServer(b"Fehler:")
+#endif
tb = traceback.format_exc()
- ##
for line in tb.splitlines():
- # self.writeToServer(line)
- #try:
- cerr << line << endl
- #except:
- # pass
- #else:
- # continue
+#ifdef DEBUG
+ self.writeToServer(line)
+#endif
+ try:
+ cerr << line << endl
+ except:
+ pass
continue
return (CmdResult.Success, "")
@@ -346,10 +347,10 @@ class PyCRCtrl:
def stop(self, prm=None):
def stopping(self):
while self.clonk and self.stopped:
- self.writeToServer("/start 6000")
+ self.writeToServer("/start 60000")
if self.stopped == False:
return
- sleep(10)
+ sleep(100)
if self.stopped == False:
self.stopped = True