# HG changeset patch # User Bryan O'Sullivan # Date 1356032404 28800 # Node ID c60d09dc2164c16e63f21782e3326869be6c4e02 # Parent 2cf01eb74842954838b24384368db50425cb74c8 inotify: on Python < 2.6, socket.error lacks errno diff -r 2cf01eb74842 -r c60d09dc2164 hgext/inotify/server.py --- a/hgext/inotify/server.py Tue Dec 18 01:51:08 2012 +0100 +++ b/hgext/inotify/server.py Thu Dec 20 11:40:04 2012 -0800 @@ -334,7 +334,7 @@ lambda p: os.path.join(root, '.hg', p), 'inotify') except (OSError, socket.error), err: - if err.errno == errno.EADDRINUSE: + if err.args[0] == errno.EADDRINUSE: raise AlreadyStartedException(_('cannot start: ' 'socket is already bound')) raise