forked from shaba/openuds
A little fix
This commit is contained in:
parent
195e47f443
commit
2e31d2ec1e
@ -69,11 +69,13 @@ class CryptoManager(object):
|
||||
return self._rsa.encrypt(string.encode('utf-8'), '')[0].encode(CryptoManager.CODEC)
|
||||
|
||||
def decrypt(self, string):
|
||||
# import inspect
|
||||
try:
|
||||
atfork()
|
||||
return self._rsa.decrypt(string.decode(CryptoManager.CODEC)).encode('utf-8')
|
||||
except:
|
||||
logger.exception('Decripting')
|
||||
logger.exception('Decripting: {0}'.format(string))
|
||||
# logger.error(inspect.stack())
|
||||
return 'decript error'
|
||||
|
||||
def xor(self, s1, s2):
|
||||
|
@ -86,7 +86,7 @@ class Storage(object):
|
||||
return self.readData(skey)
|
||||
|
||||
def getPickle(self, skey):
|
||||
return cPickle.loads(self.readData(skey).encode('uft-8'))
|
||||
return cPickle.loads(self.readData(skey).encode('utf-8'))
|
||||
|
||||
def remove(self, skey):
|
||||
try:
|
||||
|
@ -35,7 +35,8 @@ from __future__ import unicode_literals
|
||||
from django.db import transaction
|
||||
from uds.core.managers.UserServiceManager import UserServiceManager
|
||||
from uds.core.util.Config import GlobalConfig
|
||||
from uds.models import UserService, getSqlDatetime, State
|
||||
from uds.models import UserService, getSqlDatetime
|
||||
from uds.core.util.State import State
|
||||
from uds.core.jobs.Job import Job
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
Loading…
x
Reference in New Issue
Block a user