Committin a 'working' checkpoint before I break more stuff.
This commit is contained in:
parent
ccf078b5c8
commit
d3808c1ea2
18 changed files with 494 additions and 444 deletions
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
11
src/exceptions_generic.py
Normal file
11
src/exceptions_generic.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
"""
|
||||
This module contains exceptions used throughout the server
|
||||
"""
|
||||
class GenericException(Exception):
|
||||
"""
|
||||
The custom exception class from which all other exceptions are derived.
|
||||
"""
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def __str__(self):
|
||||
return repr(self.value)
|
||||
19
src/flags.py
Normal file
19
src/flags.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"""
|
||||
Everything related to flags and flag management.
|
||||
"""
|
||||
import defines_global
|
||||
|
||||
def is_unsavable_flag(flagname):
|
||||
"""
|
||||
Returns TRUE if the flag is an unsavable flag.
|
||||
"""
|
||||
return flagname.upper() in defines_global.NOSAVE_FLAGS
|
||||
|
||||
def is_modifiable_flag(flagname):
|
||||
"""
|
||||
Check to see if a particular flag is modifiable.
|
||||
"""
|
||||
if flagname.upper() not in defines_global.NOSET_FLAGS:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
Loading…
Add table
Add a link
Reference in a new issue