Skip to content

Commit a345436

Browse files
committed
Merge pull request weecology#204 from bendmorris/badscripts
Don't crash when a script fails to load.
2 parents 12bfc02 + a718c8d commit a345436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import os
9+
import sys
910
from os.path import join, isfile, getmtime, exists
1011
import imp
1112
from lib.compile import compile_script
@@ -78,8 +79,7 @@ def MODULE_LIST(force_compile=False):
7879
new_module.SCRIPT.download
7980
modules.append(new_module)
8081
except:
81-
print "Failed to load script: %s (%s)" % (script_name, search_path)
82-
raise
82+
sys.stderr.write("Failed to load script: %s (%s)" % (script_name, search_path))
8383

8484
return modules
8585

0 commit comments

Comments
 (0)