Explorar el Código

define unicode for Py3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74351 15284696-431f-4ddb-bdfa-cd5b030d7da7
Stefan Blumentrath hace 6 años
padre
commit
58f353cd47
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      lib/python/temporal/datetime_math.py

+ 4 - 0
lib/python/temporal/datetime_math.py

@@ -8,6 +8,7 @@ for details.
 
 :authors: Soeren Gebbert
 """
+import sys
 from datetime import datetime, timedelta
 from .core import get_tgis_message_interface
 import copy
@@ -18,6 +19,9 @@ try:
 except:
     has_dateutil = False
 
+if sys.version_info[0]:
+    unicode = str
+
 DAY_IN_SECONDS = 86400
 SECOND_AS_DAY = 1.1574074074074073e-05