aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/uzbl-event-manager
diff options
context:
space:
mode:
Diffstat (limited to 'bin/uzbl-event-manager')
-rwxr-xr-xbin/uzbl-event-manager16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/uzbl-event-manager b/bin/uzbl-event-manager
index 56253ef..c9f7391 100755
--- a/bin/uzbl-event-manager
+++ b/bin/uzbl-event-manager
@@ -3,6 +3,7 @@
# Event Manager for Uzbl
# Copyright (c) 2009-2010, Mason Larobina <mason.larobina@gmail.com>
# Copyright (c) 2009, Dieter Plaetinck <dieter@plaetinck.be>
+# Copyright (c) 2012, Benjamin Barenblat <benjamin@barenblat.name>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -568,11 +569,18 @@ class UzblEventDaemon(object):
self.close_server_socket()
sock = socket(AF_UNIX, SOCK_STREAM)
- sock.bind(opts.server_socket)
- sock.listen(5)
+ try:
+ sock.bind(opts.server_socket)
+ sock.listen(5)
- self.server_socket = sock
- logger.debug('bound server socket to %r', opts.server_socket)
+ self.server_socket = sock
+ logger.debug('bound server socket to %r', opts.server_socket)
+ except socket_error:
+ if not self._quit:
+ logger.critical('could not create socket at %r',
+ opts.server_socket,
+ exc_info=True)
+ sys.exit(2)
def run(self):
'''Main event daemon loop.'''