mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update common
This commit is contained in:
14
app_common/lib/user_agents/compat.py
Normal file
14
app_common/lib/user_agents/compat.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
||||
if PY3:
|
||||
string_types = str
|
||||
|
||||
def iteritems(d, **kw):
|
||||
return iter(d.items(**kw))
|
||||
else:
|
||||
string_types = basestring
|
||||
|
||||
def iteritems(d, **kw):
|
||||
return iter(d.iteritems(**kw))
|
||||
Reference in New Issue
Block a user