avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r791801 - in /hadoop/avro/trunk: CHANGES.txt src/py/avro/genericio.py src/py/avro/io.py src/test/py/testipc.py
Date Tue, 07 Jul 2009 11:45:49 GMT
Author: sharad
Date: Tue Jul  7 11:45:48 2009
New Revision: 791801

URL: http://svn.apache.org/viewvc?rev=791801&view=rev
Log:
AVRO-64. Fix socket and parser issue on Mac OS.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/src/py/avro/genericio.py
    hadoop/avro/trunk/src/py/avro/io.py
    hadoop/avro/trunk/src/test/py/testipc.py

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=791801&r1=791800&r2=791801&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Tue Jul  7 11:45:48 2009
@@ -139,3 +139,5 @@
     AVRO-74. Add missing license headers in C++.  (cutting)
 
     AVRO-73. Workaround in python to fix simplejson bug on Mac OS. (sharad)
+
+    AVRO-64. Fix socket and parser issue on Mac OS. (sharad)

Modified: hadoop/avro/trunk/src/py/avro/genericio.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/py/avro/genericio.py?rev=791801&r1=791800&r2=791801&view=diff
==============================================================================
--- hadoop/avro/trunk/src/py/avro/genericio.py (original)
+++ hadoop/avro/trunk/src/py/avro/genericio.py Tue Jul  7 11:45:48 2009
@@ -66,7 +66,7 @@
 _validatefn = {
      schema.NULL : lambda schm, object: object is None,
      schema.BOOLEAN : lambda schm, object: isinstance(object, bool),
-     schema.STRING : lambda schm, object: isinstance(object, unicode),
+     schema.STRING : lambda schm, object: isinstance(object, basestring),
      schema.FLOAT : lambda schm, object: isinstance(object, float),
      schema.DOUBLE : lambda schm, object: isinstance(object, float),
      schema.BYTES : lambda schm, object: isinstance(object, str),

Modified: hadoop/avro/trunk/src/py/avro/io.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/py/avro/io.py?rev=791801&r1=791800&r2=791801&view=diff
==============================================================================
--- hadoop/avro/trunk/src/py/avro/io.py (original)
+++ hadoop/avro/trunk/src/py/avro/io.py Tue Jul  7 11:45:48 2009
@@ -188,7 +188,7 @@
     self.__writer.write(struct.pack(len(datum).__str__()+'s',datum))
 
   def writeutf8(self, datum):
-    if not isinstance(datum, unicode):
+    if not isinstance(datum, basestring):
       raise AvroTypeException(schema.STRING, datum, 
                               "avro STRING should be python unicode")
     datum = datum.encode("utf-8")

Modified: hadoop/avro/trunk/src/test/py/testipc.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/py/testipc.py?rev=791801&r1=791800&r2=791801&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/py/testipc.py (original)
+++ hadoop/avro/trunk/src/test/py/testipc.py Tue Jul  7 11:45:48 2009
@@ -104,4 +104,7 @@
 
   def checkshutdown(self):
     if self.server is not None:
-      self.server.close()
+      try:
+        self.server.close()
+      except Exception, e:
+        print "Exception while closing socket", e



Mime
View raw message