Handle FileNotFoundError in ipc.listen

Fixes #1530
This commit is contained in:
Florian Bruhin 2016-06-07 16:47:40 +02:00
parent b972acf20c
commit 9880f5bd5f
2 changed files with 8 additions and 1 deletions

View File

@ -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 File

@ -219,7 +219,13 @@ class IPCServer(QObject):
# 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):