Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / x11 / py-Xlib / patches / patch-Xlib_xauth.py
blob384022bd35237d2f82531837baf2adba77d81007
1 $NetBSD: patch-Xlib_xauth.py,v 1.1 2011/08/22 12:18:19 wiz Exp $
3 Python-3.1 compatibility.
4 https://sourceforge.net/tracker/?func=detail&aid=3405244&group_id=10350&atid=310350
6 --- Xlib/xauth.py.orig 2007-06-10 14:11:58.000000000 +0000
7 +++ Xlib/xauth.py
8 @@ -42,7 +42,7 @@ class Xauthority:
10 try:
11 raw = open(filename, 'rb').read()
12 - except IOError, err:
13 + except IOError as err:
14 raise error.XauthError('~/.Xauthority: %s' % err)
16 self.entries = []
17 @@ -84,12 +84,12 @@ class Xauthority:
18 break
20 self.entries.append((family, addr, num, name, data))
21 - except struct.error, e:
22 - print "Xlib.xauth: warning, failed to parse part of xauthority file (%s), aborting all further parsing" % filename
23 + except struct.error as e:
24 + print ("Xlib.xauth: warning, failed to parse part of xauthority file (%s), aborting all further parsing" % filename)
25 #pass
27 if len(self.entries) == 0:
28 - print "Xlib.xauth: warning, no xauthority details available"
29 + print ("Xlib.xauth: warning, no xauthority details available")
30 # raise an error? this should get partially caught by the XNoAuthError in get_best_auth..
32 def __len__(self):