1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-18 06:03:54 +03:00
This commit is contained in:
Adolfo Gómez García 2019-04-23 13:44:37 +02:00
parent 2b9d625b5d
commit a7116b9e2e
4 changed files with 9 additions and 8 deletions

View File

@ -34,7 +34,7 @@ from __future__ import unicode_literals
# On centos, old six release does not includes byte2int, nor six.PY2
import six
VERSION = '2.2.0'
VERSION = '3.0.0'
__title__ = 'udclient'
__version__ = VERSION

View File

@ -131,7 +131,7 @@ class Actor(Handler):
"""
logger.debug("Ticket args for GET: {0}".format(self._args))
secure = self._params.get('secure') in ('1', 'true')
# secure = self._params.get('secure') in ('1', 'true')
if len(self._args) != 2:
raise RequestError('Invalid request')

View File

@ -414,7 +414,11 @@ class ServicesPools(ModelHandler):
pass
def deleteItem(self, item):
item.remove() # This will mark it for deletion, but in fact will not delete it directly
try:
logger.debug('Deleting {}'.format(item))
item.remove() # This will mark it for deletion, but in fact will not delete it directly
except:
logger.exception()
# Logs
def getLogs(self, item):

View File

@ -30,10 +30,7 @@
"""
@author: Adolfo Gómez, dkmaster at dkmon dot com
"""
from __future__ import unicode_literals
from django.utils.translation import ugettext_noop as _, ugettext_lazy
import six
# States for different objects. Not all objects supports all States
@ -71,7 +68,7 @@ class State(object):
LAUNCHING: _('Waiting publication'),
PREPARING: _('In preparation'),
USABLE: _('Valid'),
REMOVABLE: _('Waiting for removal'),
REMOVABLE: _('Removing'), # Display as it is removing
RESTRAINED: _('Restrained'),
REMOVING: _('Removing'),
REMOVED: _('Removed'),
@ -163,6 +160,6 @@ class State(object):
Returns a dictionary with current active locale translation of States to States String
"""
res = {}
for k, v in six.iteritems(State.string):
for k, v in State.string.items():
res[k] = ugettext_lazy(v)
return res