Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/web.py

Issue 5391933643948032: Issue 1696 - Make it possible to add URL handlers not in sitescripts (Closed)
Patch Set: Created Dec. 14, 2014, 10:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/web.py
===================================================================
--- a/sitescripts/web.py
+++ b/sitescripts/web.py
@@ -16,6 +16,7 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import base64
+import imp
import importlib
from sitescripts.utils import get_config
@@ -58,4 +59,8 @@
return ""
for module in set(get_config().options("multiplexer")) - set(get_config().defaults()):
- importlib.import_module(module)
+ module_path = get_config().get("multiplexer", module)
+ if module_path:
+ imp.load_source(module, module_path)
+ else:
+ importlib.import_module(module)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld