[distance] Add safety belt on geographical distance units, closes #248555
authorVincent Michel <vincent.michel@logilab.fr>
Mon, 09 Jun 2014 13:51:36 +0000
changeset 438 5689a4cc4915
parent 431 a458f2793377
child 439 b5371dba546e
[distance] Add safety belt on geographical distance units, closes #248555
utils/distances.py
--- a/utils/distances.py	Wed May 21 22:12:01 2014 +0000
+++ b/utils/distances.py	Mon Jun 09 13:51:36 2014 +0000
@@ -318,6 +318,7 @@
 
         - `units` can be 'm' (meters) or 'km' (kilometers)
     """
+    assert units in ('m', 'km')
     pointa = (float(pointa[0]), float(pointa[1]))
     pointb = (float(pointb[0]), float(pointb[1]))