diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/uzbl-event-manager | 12 | ||||
-rwxr-xr-x | bin/uzbl-tabbed | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/bin/uzbl-event-manager b/bin/uzbl-event-manager index 64a1354..56253ef 100755 --- a/bin/uzbl-event-manager +++ b/bin/uzbl-event-manager @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Event Manager for Uzbl # Copyright (c) 2009-2010, Mason Larobina <mason.larobina@gmail.com> @@ -42,7 +42,7 @@ from itertools import count from optparse import OptionParser from select import select from signal import signal, SIGTERM, SIGINT, SIGKILL -from socket import socket, AF_UNIX, SOCK_STREAM +from socket import socket, AF_UNIX, SOCK_STREAM, error as socket_error from traceback import format_exc @@ -370,7 +370,7 @@ class Uzbl(object): data = ''.join(self.child_buffer) try: bsent = self.child_socket.send(data) - except socket.error as e: + except socket_error as e: if e.errno in (errno.EAGAIN, errno.EINTR): self.child_buffer = [data] return @@ -625,13 +625,13 @@ class UzblEventDaemon(object): self.uzbls[child_socket] = Uzbl(self, child_socket) connections += 1 - for uzbl in [self.uzbls[s] for s in writes]: + for uzbl in [self.uzbls[s] for s in writes if s in self.uzbls ]: uzbl.do_send() - for uzbl in [self.uzbls[s] for s in reads]: + for uzbl in [self.uzbls[s] for s in reads if s in self.uzbls]: uzbl.read() - for uzbl in [self.uzbls[s] for s in errors]: + for uzbl in [self.uzbls[s] for s in errors if s in self.uzbls]: uzbl.logger.error('socket read error') uzbl.close() diff --git a/bin/uzbl-tabbed b/bin/uzbl-tabbed index 1a65788..b78a54a 100755 --- a/bin/uzbl-tabbed +++ b/bin/uzbl-tabbed @@ -884,7 +884,11 @@ class UzblTabbed: title = config['new_tab_title'] cmd = ['uzbl-browser', '-n', name, '-s', str(sid), - '--connect-socket', self.socket_path, '--uri', str(uri)] + '--connect-socket', self.socket_path] + + if(uri): + cmd = cmd + ['--uri', str(uri)] + gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH) uzbl = UzblInstance(self, name, uri, title, switch) |