mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-28 01:28:51 +01:00
Merge pull request #790 from koriaf/master
fix<migrations>: correct import of b64decode in migration 0020
This commit is contained in:
commit
909ecc400b
@ -9,7 +9,12 @@ def unpickle_settings(settings_pickled):
|
|||||||
import pickle
|
import pickle
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
from helpdesk.lib import b64decode
|
try:
|
||||||
|
# Python 2 support
|
||||||
|
from base64 import urlsafe_b64decode as b64decode
|
||||||
|
except ImportError:
|
||||||
|
# Python 3 support
|
||||||
|
from base64 import decodebytes as b64decode
|
||||||
try:
|
try:
|
||||||
return pickle.loads(b64decode(settings_pickled.encode('utf-8')))
|
return pickle.loads(b64decode(settings_pickled.encode('utf-8')))
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user