Permalink
Browse files

Handle FileNotFoundError in ipc.listen

Fixes #1530
  • Loading branch information...
The-Compiler committed Jun 7, 2016
1 parent b972acf commit 9880f5bd5f94498b233539c6c9588225c10b77bc
Showing with 8 additions and 1 deletion.
  1. +1 −0 CHANGELOG.asciidoc
  2. +7 −1 qutebrowser/misc/ipc.py
View
@@ -87,6 +87,7 @@ Fixed
- Fixed rebinding of keybindings being case-sensitive
- Fix for tab indicators getting lost when moving tabs
- Fixed handling of backspace in number hinting mode
+- Fixed `FileNotFoundError` when starting in some cases on old Qt versions
v0.6.2
------
View
@@ -219,7 +219,13 @@ def listen(self):
# https://bugreports.qt.io/browse/QTBUG-48635
#
# This means we only use setSocketOption on Windows...
- os.chmod(self._server.fullServerName(), 0o700)
+ try:
+ os.chmod(self._server.fullServerName(), 0o700)
+ except FileNotFoundError:
+ # https://github.com/The-Compiler/qutebrowser/issues/1530
+ # The server doesn't actually exist even if ok was reported as
+ # True, so report this as an error.
+ raise ListenError(self._server)
@pyqtSlot('QLocalSocket::LocalSocketError')
def on_error(self, err):

0 comments on commit 9880f5b

Please sign in to comment.