diff --git a/docs/source/quick_start.rst b/docs/source/quick_start.rst index 306237d..ade9b2a 100644 --- a/docs/source/quick_start.rst +++ b/docs/source/quick_start.rst @@ -158,12 +158,6 @@ To get up and running in no time the template helps a lot! If you fail to pass an argument you will get a small error message asking for a configuration file. -The location for the config file and the argument itself are very flexible. You -can pass an absolute path or just the name of the file without an extension, -like:: - - $ pecan serve config - Simple Configuration -------------------- diff --git a/pecan/configuration.py b/pecan/configuration.py index 162afd0..45a2007 100644 --- a/pecan/configuration.py +++ b/pecan/configuration.py @@ -207,15 +207,12 @@ def initconf(): def set_config(name): ''' - Updates the global configuration from a path or filename. + Updates the global configuration a filename. - :param name: Path or filename, as a string. + :param name: filename, as a string. ''' - - if '/' in name: - _runtime_conf.update(conf_from_file(name)) - else: - _runtime_conf.update_with_module(name) + + _runtime_conf.update(conf_from_file(name)) _runtime_conf = initconf() diff --git a/tests/test_conf.py b/tests/test_conf.py index eaf8e5a..a57f2c3 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -108,14 +108,6 @@ class TestConf(TestCase): configuration.set_config(path) assert list(_runtime_conf.server) == list(configuration.initconf().server) - def test_config_set_from_module(self): - configuration.set_config('config') - self.assertEqual(_runtime_conf.server.host, '1.1.1.1') - - def test_config_set_from_module_with_extension(self): - configuration.set_config('config.py') - self.assertEqual(_runtime_conf.server.host, '1.1.1.1') - def test_config_dir(self): if sys.version_info >= (2, 6): conf = configuration.Config({})