Permalink
Browse files

safer hooking

  • Loading branch information...
killdash9
killdash9 committed Jul 29, 2012
1 parent 39d93d6 commit 2bb54be65accb7ff55845fcdca7826230d0b671d
@@ -17,7 +17,7 @@ def getText(nodelist):
"""
hookCode="""#Begin parental controls hook
try:import parentalcontrols.wrap
-except:raise
+except:pass
#End parental controls hook
"""
@@ -78,6 +78,7 @@ def hookPlugin(pluginid):
f = open(pluginlibfile,'w')
f.write(code)
f.close()
+ return state
def unhookPlugin(pluginid):
state = getPluginHookState(pluginid)
@@ -8,8 +8,8 @@ def checkProtection():
for plugin in plugins:
state = hook.getPluginHookState(plugin)
if (not state['hooked']) or not (state['uptodate']):
- hook.hookPlugin(plugin)
- common.msg("Re-protecting plugin " + plugin)
+ p=hook.hookPlugin(plugin)
+ common.msg("Re-protecting plugin " + p['name'])
common.msg("Started")

0 comments on commit 2bb54be

Please sign in to comment.