[Checkins] SVN: Products.SQLAlchemyDA/trunk/da.py workaround for crappy MySQL implementations

Andreas Jung andreas at andreas-jung.com
Fri Jun 8 14:39:39 EDT 2007


Log message for revision 76518:
  workaround for crappy MySQL implementations
  

Changed:
  U   Products.SQLAlchemyDA/trunk/da.py

-=-
Modified: Products.SQLAlchemyDA/trunk/da.py
===================================================================
--- Products.SQLAlchemyDA/trunk/da.py	2007-06-08 18:28:30 UTC (rev 76517)
+++ Products.SQLAlchemyDA/trunk/da.py	2007-06-08 18:39:38 UTC (rev 76518)
@@ -126,9 +126,14 @@
             map = dict()
             for name  in types_mapping.keys():
                 type_obj = getattr(dbapi, name, None)
-                if type_obj is not None:
-                    for v in type_obj.values:
-                        map[v] = name
+                if type_obj:
+                    if hasattr(type_obj, 'values'):
+                        for v in type_obj.values:
+                            map[v] = name
+                    else:
+                        for v in type_obj:
+                            map[v] = name
+
             self._v_types_map = map  
         return self._v_types_map
 



More information about the Checkins mailing list