diff --git a/storage/filesystem.py b/storage/filesystem.py index 87a2c9e..f23f777 100644 --- a/storage/filesystem.py +++ b/storage/filesystem.py @@ -49,11 +49,12 @@ class FileSystemStorage(object): def getDir(self, address, subDir=None): subDir = subDir or self.subDir + subDir = str(subDir) if self.rootDir is None: if subDir: return os.path.join(subDir, address) return address - return os.path.join(self.rootDir, subDir, address) + return os.path.join(str(self.rootDir), subDir, address) def setData(self, address, data, params={}): subDir = params.get('subdirectory') diff --git a/util/format.py b/util/format.py index da20356..388117a 100644 --- a/util/format.py +++ b/util/format.py @@ -64,6 +64,7 @@ def toStr(value, encoding='UTF-8'): return str(value) def toUnicode(value, encoding='UTF-8', fallback='ISO8859-15'): + # or: fallback='CP852' if isinstance(value, unicode): return value elif isinstance(value, str):