Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r50235:f65121a60b37
Date: 2011-12-05 00:21 +0100
http://bitbucket.org/pypy/pypy/changeset/f65121a60b37/

Log:    Return bytes for Linux abstract namespace sockets

diff --git a/pypy/rlib/rsocket.py b/pypy/rlib/rsocket.py
--- a/pypy/rlib/rsocket.py
+++ b/pypy/rlib/rsocket.py
@@ -504,7 +504,12 @@
                     self.get_path() == other.get_path())
 
         def as_object(self, fd, space):
-            return space.wrap(self.get_path())
+            path = self.get_path()
+            if _c.linux and len(path) > 0 and path[0] == '\x00':
+                # Linux abstract namespace
+                return space.wrapbytes(path)
+            else:
+                return space.wrap(path)
 
         def from_object(space, w_address):
             return UNIXAddress(space.str_w(w_address))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to