Move initialization code at the end of file
So all of it will be in one place.
This commit is contained in:
parent
aad945e01b
commit
f6835346d4
@ -256,34 +256,7 @@ class QubesVmLabel(object):
|
||||
self.name,
|
||||
self.dispvm)
|
||||
|
||||
# Globally defined lables
|
||||
QubesVmLabels = {
|
||||
"red": QubesVmLabel(1, "0xcc0000", "red" ),
|
||||
"orange": QubesVmLabel(2, "0xf57900", "orange" ),
|
||||
"yellow": QubesVmLabel(3, "0xedd400", "yellow" ),
|
||||
"green": QubesVmLabel(4, "0x73d216", "green" ),
|
||||
"gray": QubesVmLabel(5, "0x555753", "gray" ),
|
||||
"blue": QubesVmLabel(6, "0x3465a4", "blue" ),
|
||||
"purple": QubesVmLabel(7, "0x75507b", "purple" ),
|
||||
"black": QubesVmLabel(8, "0x000000", "black" ),
|
||||
}
|
||||
|
||||
QubesDispVmLabels = {
|
||||
"red": QubesVmLabel(1, "0xcc0000", "red", dispvm=True),
|
||||
"orange": QubesVmLabel(2, "0xf57900", "orange", dispvm=True),
|
||||
"yellow": QubesVmLabel(3, "0xedd400", "yellow", dispvm=True),
|
||||
"green": QubesVmLabel(4, "0x73d216", "green", dispvm=True),
|
||||
"gray": QubesVmLabel(5, "0x555753", "gray", dispvm=True),
|
||||
"blue": QubesVmLabel(6, "0x3465a4", "blue", dispvm=True),
|
||||
"purple": QubesVmLabel(7, "0x75507b", "purple", dispvm=True),
|
||||
"black": QubesVmLabel(8, "0x000000", "black", dispvm=True),
|
||||
}
|
||||
|
||||
defaults["appvm_label"] = QubesVmLabels["red"]
|
||||
defaults["template_label"] = QubesVmLabels["black"]
|
||||
defaults["servicevm_label"] = QubesVmLabels["red"]
|
||||
|
||||
QubesVmClasses = {}
|
||||
def register_qubes_vm_class(vm_class):
|
||||
QubesVmClasses[vm_class.__name__] = vm_class
|
||||
# register class as local for this module - to make it easy to import from
|
||||
@ -856,6 +829,37 @@ class QubesDaemonPidfile(object):
|
||||
self.remove_pidfile()
|
||||
return False
|
||||
|
||||
### Initialization code
|
||||
|
||||
# Globally defined lables
|
||||
QubesVmLabels = {
|
||||
"red": QubesVmLabel(1, "0xcc0000", "red" ),
|
||||
"orange": QubesVmLabel(2, "0xf57900", "orange" ),
|
||||
"yellow": QubesVmLabel(3, "0xedd400", "yellow" ),
|
||||
"green": QubesVmLabel(4, "0x73d216", "green" ),
|
||||
"gray": QubesVmLabel(5, "0x555753", "gray" ),
|
||||
"blue": QubesVmLabel(6, "0x3465a4", "blue" ),
|
||||
"purple": QubesVmLabel(7, "0x75507b", "purple" ),
|
||||
"black": QubesVmLabel(8, "0x000000", "black" ),
|
||||
}
|
||||
|
||||
QubesDispVmLabels = {
|
||||
"red": QubesVmLabel(1, "0xcc0000", "red", dispvm=True),
|
||||
"orange": QubesVmLabel(2, "0xf57900", "orange", dispvm=True),
|
||||
"yellow": QubesVmLabel(3, "0xedd400", "yellow", dispvm=True),
|
||||
"green": QubesVmLabel(4, "0x73d216", "green", dispvm=True),
|
||||
"gray": QubesVmLabel(5, "0x555753", "gray", dispvm=True),
|
||||
"blue": QubesVmLabel(6, "0x3465a4", "blue", dispvm=True),
|
||||
"purple": QubesVmLabel(7, "0x75507b", "purple", dispvm=True),
|
||||
"black": QubesVmLabel(8, "0x000000", "black", dispvm=True),
|
||||
}
|
||||
|
||||
defaults["appvm_label"] = QubesVmLabels["red"]
|
||||
defaults["template_label"] = QubesVmLabels["black"]
|
||||
defaults["servicevm_label"] = QubesVmLabels["red"]
|
||||
|
||||
|
||||
QubesVmClasses = {}
|
||||
modules_dir = os.path.join(os.path.dirname(__file__), 'modules')
|
||||
for module_file in sorted(os.listdir(modules_dir)):
|
||||
if not module_file.endswith(".py") or module_file == "__init__.py":
|
||||
|
Loading…
Reference in New Issue
Block a user