From b41e738905d03513c771a52faac1a51cda09e451 Mon Sep 17 00:00:00 2001 From: "M. Levinson" Date: Sun, 15 Feb 2009 19:58:42 +0100 Subject: [PATCH] Since commit 2c14587b88aaa8efa744b15af242e8de9193ca8c, the sample hooks.py file in the ELinks distribution will fail with an ImportError exception for any user who hasn't also installed contrib/python/lp3.py. For the benefit of users who may not otherwise need that file, I'd suggest delaying the import of lp3 until it's actually used so that the rest of hooks.py will still work without it. --- contrib/python/hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/python/hooks.py b/contrib/python/hooks.py index ffb6e1d1..5e1c60ed 100644 --- a/contrib/python/hooks.py +++ b/contrib/python/hooks.py @@ -24,7 +24,6 @@ quit_hook() -- Clean up before ELinks exits. """ import elinks -from lp3 import lp3 dumbprefixes = { "7th" : "http://7thguard.net/", @@ -97,7 +96,8 @@ def pre_format_html_hook(url, html): elif url.startswith("https://www.mbank.com.pl/ib_navibar_3.asp"): return html.replace('