Load .posted only if it is a registered module.
Avoids breaking of head.py if posted.py isn’t in modules
This commit is contained in:
@@ -12,7 +12,6 @@ import urllib.parse
|
|||||||
import time
|
import time
|
||||||
from html.entities import name2codepoint
|
from html.entities import name2codepoint
|
||||||
import web
|
import web
|
||||||
from modules.posted import check_posted
|
|
||||||
from tools import deprecated
|
from tools import deprecated
|
||||||
|
|
||||||
|
|
||||||
@@ -182,6 +181,8 @@ def gettitle(phenny, input, uri):
|
|||||||
title = "[ {0} ]".format(title)
|
title = "[ {0} ]".format(title)
|
||||||
|
|
||||||
if "posted" in phenny.variables:
|
if "posted" in phenny.variables:
|
||||||
|
from modules.posted import check_posted
|
||||||
|
|
||||||
posted = check_posted(phenny, input, uri)
|
posted = check_posted(phenny, input, uri)
|
||||||
|
|
||||||
if posted:
|
if posted:
|
||||||
|
|||||||
Reference in New Issue
Block a user