summaryrefslogtreecommitdiff
path: root/odoo/tools/appdirs.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-02 12:07:30 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit7dd062f83552fa8ff96224c29d60bafc001d73d3 (patch)
treed507e27e9d5daa91981e04b5aa81a802a9854a8d /odoo/tools/appdirs.py
parent3824b5dcc13678d3985ad45ac21dcf9ac9202c20 (diff)
[FIX] P3: text model types
* remove references to basestring & unicode (use relevant pycompat helpers) * remove some str calls (either entirely or replaced by relevant helper, either text or native) * use better API to avoid unnecessary conversions * remove some XML declarations in views
Diffstat (limited to 'odoo/tools/appdirs.py')
-rw-r--r--odoo/tools/appdirs.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/odoo/tools/appdirs.py b/odoo/tools/appdirs.py
index 8617dabfa4f..6176e6bce75 100644
--- a/odoo/tools/appdirs.py
+++ b/odoo/tools/appdirs.py
@@ -13,6 +13,7 @@ from __future__ import print_function
# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120
# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html
# - XDG spec for Un*x: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+from . import pycompat
__version_info__ = (1, 3, 0)
__version__ = '.'.join(str(v) for v in __version_info__)
@@ -21,12 +22,6 @@ __version__ = '.'.join(str(v) for v in __version_info__)
import sys
import os
-PY3 = sys.version_info[0] == 3
-
-if PY3:
- unicode = str
-
-
def user_data_dir(appname=None, appauthor=None, version=None, roaming=False):
r"""Return full path to the user-specific data dir for this application.
@@ -397,7 +392,7 @@ def _get_win_folder_with_pywin32(csidl_name):
# not return unicode strings when there is unicode data in the
# path.
try:
- dir = unicode(dir)
+ dir = pycompat.text_type(dir)
# Downgrade to short path name if have highbit chars. See
# <http://bugs.activestate.com/show_bug.cgi?id=85099>.