diff --git a/pecan/commands/shell.py b/pecan/commands/shell.py index 89fd06c..968ded0 100644 --- a/pecan/commands/shell.py +++ b/pecan/commands/shell.py @@ -125,9 +125,6 @@ class ShellCommand(BaseCommand): locs['model'] = model # insert the pecan locals - exec( - 'from pecan import abort, conf, redirect, request, response' - ) in locs from pecan import abort, conf, redirect, request, response locs['abort'] = abort locs['conf'] = conf diff --git a/pecan/configuration.py b/pecan/configuration.py index 0e7ffc0..dd6eac9 100644 --- a/pecan/configuration.py +++ b/pecan/configuration.py @@ -120,7 +120,7 @@ class Config(object): self.__values__[key] = ConfigDict(value) else: self.__values__[key] = Config(value, filename=self.__file__) - elif isinstance(value, str) and '%(confdir)s' in value: + elif isinstance(value, six.string_types) and '%(confdir)s' in value: confdir = os.path.dirname(self.__file__) or os.getcwd() self.__values__[key] = value.replace('%(confdir)s', confdir) else: @@ -221,7 +221,7 @@ def set_config(config, overwrite=False): if overwrite is True: _runtime_conf.empty() - if isinstance(config, str): + if isinstance(config, six.string_types): config = conf_from_file(config) _runtime_conf.update(config) if config.__file__: