Removed ability to run "pecan serve {{ module }}" (as config file).
This commit is contained in:
@@ -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
|
||||
--------------------
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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({})
|
||||
|
||||
Reference in New Issue
Block a user