We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1b330c commit 7dc4c2dCopy full SHA for 7dc4c2d
py/ovl.py
@@ -41,6 +41,7 @@
41
42
_CERT_DIR = os.path.expanduser('~/.config/ovl')
43
44
+_DEBUG = False
45
_ESCAPE = '~'
46
_BUFSIZ = 8192
47
_DEFAULT_HTTPS_PORT = 443
@@ -377,8 +378,9 @@ def StartRPCServer(self):
377
378
379
pid = os.fork()
380
if pid == 0:
- for fd in range(3):
381
- os.close(fd)
+ if not _DEBUG:
382
+ for fd in range(3):
383
+ os.close(fd)
384
self._server.serve_forever()
385
386
@staticmethod
@@ -1768,7 +1770,8 @@ def main():
1768
1770
except KeyboardInterrupt:
1769
1771
print('Ctrl-C received, abort')
1772
except Exception as e:
- logging.exception(e)
1773
+ if _DEBUG:
1774
+ logging.exception(e)
1775
print(f'error: {str(e)}')
1776
1777
0 commit comments