Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes #17

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Ignore invalid scripts instead of firing an exception
A message will be displayed showing the error with the script.
This is useful if the user has extra code in the scripts directory, (like a
settings.py file), that is not intended to be executed by multi-mechanize.

Floqq innovation SL.  www.floqq.com
  • Loading branch information
jvrsantacruz committed Jul 25, 2012

Verified

This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
commit 7f9869c98d586025ab9e15ceafead034c70814ea
3 changes: 2 additions & 1 deletion multimechanize/script_loader.py
Original file line number Diff line number Diff line change
@@ -52,7 +52,8 @@ def ensure_module_valid(cls, module):
"""
problem = cls.check_module_invalid(module)
if problem:
raise InvalidScriptError, problem
sys.stderr.write("Cannot import: {0}: {1}\n"
.format(module, problem))

class ScriptLoader(object):
"""Utility class to load scripts as python modules."""