From 11f6c0390d2e4d4c6575d2044ae7cd02bc30c362 Mon Sep 17 00:00:00 2001 From: Jonathan LaCour Date: Thu, 30 Dec 2010 14:27:48 -0500 Subject: [PATCH] Got sick of typing "python start.py development.py" and having things not work, so now we detect this scenario and strip off the file extension. --- pecan/configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pecan/configuration.py b/pecan/configuration.py index 9b075cd..eb24154 100755 --- a/pecan/configuration.py +++ b/pecan/configuration.py @@ -138,6 +138,9 @@ def conf_from_dict(conf_dict): return conf def import_module(conf): + if conf.endswith('.py'): + conf = conf[:-3] + if '.' in conf: parts = conf.split('.') name = '.'.join(parts[:-1])