Browse Source

[core] Fix Python3 incompatibility in mako macros

Romain Rigaux 4 years ago
parent
commit
a0af6b827b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      desktop/libs/dashboard/src/dashboard/templates/macros.mako

+ 2 - 1
desktop/libs/dashboard/src/dashboard/templates/macros.mako

@@ -17,12 +17,13 @@
 import re
 import re
 import sys
 import sys
 
 
-from itertools import izip
 
 
 if sys.version_info[0] > 2:
 if sys.version_info[0] > 2:
+  from itertools import zip
   from urllib.parse import quote as urllib_quote
   from urllib.parse import quote as urllib_quote
   from django.utils.translation import gettext as _
   from django.utils.translation import gettext as _
 else:
 else:
+  from itertools import izip
   from urllib import quote as urllib_quote
   from urllib import quote as urllib_quote
   from django.utils.translation import ugettext as _
   from django.utils.translation import ugettext as _