Richo Healey committed 00f6b4b

Use DOKO_PRECISION environment variable to globally set precision

Comments (0)

Files changed (1)

 Use the Core Location framework.
+import os
 import sys
 import optparse
 from optparse import OptionValueError
     if options.strategy not in LOCATION_STRATEGIES:
         raise OptionValueError("%s is not a valid strategy" % options.strategy)
+    if os.getenv("DOKO_PRECISION"):
+        try:
+            Location.set_precision(os.getenv("DOKO_PRECISION"))
+        except ValueError:
+            raise "Invalid value in DOKO_PRECISION"
     if options.precision: