Get rid of submit/error_manager.py which is apparently unused
- Legacy-Id: 6656
This commit is contained in:
parent
2daff23f02
commit
b46f0ba733
|
@ -1,19 +0,0 @@
|
|||
from ietf.submit.models import IdSubmissionStatus
|
||||
|
||||
class ErrorManager(object):
|
||||
ERROR_CODES = {
|
||||
'DEFAULT': 'Unknow error',
|
||||
'INVALID_FILENAME': 111,
|
||||
'EXCEEDED_SIZE': 102,
|
||||
}
|
||||
|
||||
def get_error_str(self, key):
|
||||
error_code = self.ERROR_CODES.get(key, self.ERROR_CODES['DEFAULT'])
|
||||
if isinstance(error_code, basestring):
|
||||
return '%s (%s)' % (key, error_code)
|
||||
try:
|
||||
return IdSubmissionStatus.objects.get(status_id=error_code).status_value
|
||||
except IdSubmissionStatus.DoesNotExist:
|
||||
return '%s (%s)' % (self.ERROR_CODES['DEFAULT'], key)
|
||||
|
||||
MainErrorManager=ErrorManager()
|
Loading…
Reference in a new issue