[cig-commits] r19503 - cs/spatialdata/trunk/spatialdata/spatialdb

brad at geodynamics.org brad at geodynamics.org
Fri Jan 27 15:00:44 PST 2012


Author: brad
Date: 2012-01-27 15:00:44 -0800 (Fri, 27 Jan 2012)
New Revision: 19503

Modified:
   cs/spatialdata/trunk/spatialdata/spatialdb/UniformDB.py
Log:
Fixed parsing of non-derived units in UnifornDB.

Modified: cs/spatialdata/trunk/spatialdata/spatialdb/UniformDB.py
===================================================================
--- cs/spatialdata/trunk/spatialdata/spatialdb/UniformDB.py	2012-01-27 19:49:03 UTC (rev 19502)
+++ cs/spatialdata/trunk/spatialdata/spatialdb/UniformDB.py	2012-01-27 23:00:44 UTC (rev 19503)
@@ -83,7 +83,11 @@
       if len(str(x).split("*")) > 1:
         xdim = self.parser.parse(str(x))
         data.append(float((xdim.value)))
-        units.append(xdim._strDerivation())
+        strDeriv = xdim._strDerivation()
+        if len(strDeriv) > 0:
+          units.append(xdim._strDerivation())
+        else:
+          units.append("none")
       else:
         data.append(float(x))
         units.append("none")



More information about the CIG-COMMITS mailing list