Sfoglia il codice sorgente

define unicode for Py3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74351 15284696-431f-4ddb-bdfa-cd5b030d7da7
Stefan Blumentrath 6 anni fa
parent
commit
58f353cd47
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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
 :authors: Soeren Gebbert
 """
 """
+import sys
 from datetime import datetime, timedelta
 from datetime import datetime, timedelta
 from .core import get_tgis_message_interface
 from .core import get_tgis_message_interface
 import copy
 import copy
@@ -18,6 +19,9 @@ try:
 except:
 except:
     has_dateutil = False
     has_dateutil = False
 
 
+if sys.version_info[0]:
+    unicode = str
+
 DAY_IN_SECONDS = 86400
 DAY_IN_SECONDS = 86400
 SECOND_AS_DAY = 1.1574074074074073e-05
 SECOND_AS_DAY = 1.1574074074074073e-05