[Xcb-commit] XcbPythonBinding.mdwn

XCB site xcb at freedesktop.org
Sun Jun 15 04:54:33 PDT 2008


 XcbPythonBinding.mdwn |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 3c2ff747d81656f8170d2ac29ecc3a473d204fe1
Author: XCB site <xcb at freedesktop.org>
Date:   Sun Jun 15 04:54:33 2008 -0700

    web commit by AstralStorm: Fix missing lines

diff --git a/XcbPythonBinding.mdwn b/XcbPythonBinding.mdwn
index 372c043..6d75e7c 100644
--- a/XcbPythonBinding.mdwn
+++ b/XcbPythonBinding.mdwn
@@ -182,12 +182,14 @@ The above example doesn't include XAuthority file parsing. To parse that file, y
         # byteswap to network order
         xline[3] = struct.pack("!%ds" % len(xline[3]), xline[3])[:-1]
         xauth[":".join(xline[:2])] = ":".join(xline[2:])
+        
         # No host means localhost, add these entries
         if xline[0] == "localhost":
-
-
-
-            xauth[":%s" % xline[1]] = ":".join(xline[2:])
+            # byteswap to network order
+            xline[3] = struct.pack("!%ds" % len(xline[3]), xline[3])[:-1]
+            xauth[":".join(xline[:2])] = ":".join(xline[2:])
+            if xline[0] == "localhost":
+                xauth[":%s" % xline[1]] = ":".join(xline[2:])
 
 Then to connect you can use the mapping xauth like this:
 


More information about the xcb-commit mailing list