-
Notifications
You must be signed in to change notification settings - Fork 0
/
ErrorCodes.py
40 lines (27 loc) · 1.02 KB
/
ErrorCodes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright (c) 2018 A&D
#Class with error codes for each script that needs them
from ErrorCodesCryptoEvaluator import ErrorCodesCryptoEvaluator
class ErrorCodes:
def __init__(self, scriptname):
"""
:param scriptname:
"""
self.errocodesclass = self.geterrorcodesclass(scriptname)
@property
def errorflags(self):
return self.geterrorflagsdict()
def geterrorcodesclass(self, scriptname):
return self.possibleerrorcodesclasses[scriptname]
@property
def possibleerrorcodesclasses(self):
return {'CryptoEvaluator': ErrorCodesCryptoEvaluator()}
def geterrorflagsdict(self):
return self.errocodesclass.errorflagsdict
def setflag(self, flagname, setval):
self.errocodesclass.setflag(flagname, setval)
def getvalueofflag(self, flagname):
return self.errocodesclass.getvalueofflag(flagname)
def resetflags(self):
self.errocodesclass.resetflags()
def printflags(self):
self.errocodesclass.printflags()