change indentation from 2 spaces to 4, fix #5
This commit is contained in:
60
main.py
60
main.py
@@ -9,52 +9,52 @@ from traceback import format_exc as print_traceback
|
||||
sys.path += ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7', '/usr/lib/pyshared/python2.7']
|
||||
|
||||
try:
|
||||
from helpers import *
|
||||
from helpers import *
|
||||
except:
|
||||
print("[RedstonerUtils] ERROR: Failed to import helpers:")
|
||||
print(print_traceback())
|
||||
print("[RedstonerUtils] ERROR: Failed to import helpers:")
|
||||
print(print_traceback())
|
||||
|
||||
|
||||
|
||||
@hook.enable
|
||||
def on_enable():
|
||||
info("RedstonerUtils enabled!")
|
||||
info("RedstonerUtils enabled!")
|
||||
|
||||
|
||||
@hook.disable
|
||||
def on_disable():
|
||||
shared["modules"]["reports"].stop_reporting()
|
||||
info("RedstonerUtils disabled!")
|
||||
shared["modules"]["reports"].stop_reporting()
|
||||
info("RedstonerUtils disabled!")
|
||||
|
||||
|
||||
info("Loading RedstonerUtils...")
|
||||
|
||||
# Import all modules, in this order
|
||||
shared["load_modules"] = [
|
||||
"misc",
|
||||
"adminchat",
|
||||
"badges",
|
||||
"calc",
|
||||
"lagchunks",
|
||||
"reports",
|
||||
"chatgroups",
|
||||
"webtoken",
|
||||
"saylol",
|
||||
"skullclick",
|
||||
"mentio",
|
||||
"cycle",
|
||||
"motd",
|
||||
"abot",
|
||||
"forcefield",
|
||||
"damnspam",
|
||||
"check",
|
||||
"imout"
|
||||
"misc",
|
||||
"adminchat",
|
||||
"badges",
|
||||
"calc",
|
||||
"lagchunks",
|
||||
"reports",
|
||||
"chatgroups",
|
||||
"webtoken",
|
||||
"saylol",
|
||||
"skullclick",
|
||||
"mentio",
|
||||
"cycle",
|
||||
"motd",
|
||||
"abot",
|
||||
"forcefield",
|
||||
"damnspam",
|
||||
"check",
|
||||
"imout"
|
||||
]
|
||||
shared["modules"] = {}
|
||||
for module in shared["load_modules"]:
|
||||
try:
|
||||
shared["modules"][module] = __import__(module)
|
||||
info("Module %s loaded." % module)
|
||||
except:
|
||||
error("Failed to import module %s:" % module)
|
||||
error(print_traceback())
|
||||
try:
|
||||
shared["modules"][module] = __import__(module)
|
||||
info("Module %s loaded." % module)
|
||||
except:
|
||||
error("Failed to import module %s:" % module)
|
||||
error(print_traceback())
|
||||
Reference in New Issue
Block a user