changeset 18107:c60d09dc2164

inotify: on Python < 2.6, socket.error lacks errno
author Bryan O'Sullivan <bryano@fb.com>
date Thu, 20 Dec 2012 11:40:04 -0800
parents 2cf01eb74842
children bc694d78d843
files hgext/inotify/server.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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