From 1b8e52b877ddd6f7113f8287c90f2fb7ca1afc22 Mon Sep 17 00:00:00 2001 From: andreimarcu Date: Sun, 6 Apr 2014 23:00:29 -0400 Subject: [PATCH] Load .posted only if it is a registered module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids breaking of head.py if posted.py isn’t in modules --- modules/head.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/head.py b/modules/head.py index c35b2ed..bbb4499 100644 --- a/modules/head.py +++ b/modules/head.py @@ -12,7 +12,6 @@ import urllib.parse import time from html.entities import name2codepoint import web -from modules.posted import check_posted from tools import deprecated @@ -182,6 +181,8 @@ def gettitle(phenny, input, uri): title = "[ {0} ]".format(title) if "posted" in phenny.variables: + from modules.posted import check_posted + posted = check_posted(phenny, input, uri) if posted: