File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ def configure_more(directories):
169
169
170
170
if __name__ == '__main__' :
171
171
import sys
172
+ import imp
172
173
args = sys .argv [1 :]
173
174
if not args and os .path .isfile ('gorun_settings.py' ):
174
175
print >> sys .stderr , "Guessing you want to use gorun_settings.py"
@@ -183,11 +184,9 @@ def configure_more(directories):
183
184
184
185
185
186
settings_file = args [- 1 ]
186
- if settings_file .endswith ('.py' ):
187
- settings_file = settings_file [:- 3 ]
188
187
189
188
sys .path .append (os .path .abspath (os .curdir ))
190
- x = __import__ ( settings_file )
189
+ x = imp . load_source ( 'gorun_settings' , settings_file )
191
190
settings .DIRECTORIES = x .DIRECTORIES
192
191
settings .VERBOSE = getattr (x , 'VERBOSE' , settings .VERBOSE )
193
192
settings .IGNORE_EXTENSIONS = getattr (x , 'IGNORE_EXTENSIONS' , tuple ())
You can’t perform that action at this time.
0 commit comments