Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[svn] add a -q option to paster shell to disable loading the logging …

…configuration

from the config file

--HG--
branch : trunk
  • Loading branch information...
commit 8d74d1332926aa6254596c5a06819d303234d159 1 parent 3a29204
pjenvey authored
Showing with 13 additions and 5 deletions.
  1. +2 −1  CHANGELOG
  2. +11 −4 pylons/commands.py
View
3  CHANGELOG
@@ -11,7 +11,8 @@ Pylons Changelog
* Allow passing of a state keyword to the validate decorator for the
to_python methods. Fixes #297.
* paster shell now configures logging from the config file, like paster serve
- and setup-app. Thanks Yannick Gingras.
+ and setup-app. This can be disabled via the -q option. Thanks Yannick
+ Gingras.
0.9.6rc3 (August 18, 2007)
* Fixed controllers.core to allow responses of None (empty bodies). Logs a
View
15 pylons/commands.py
@@ -308,6 +308,12 @@ class ShellCommand(Command):
dest='disable_ipython',
help="Don't use IPython if it is available")
+ parser.add_option('-q',
+ action='count',
+ dest='quiet',
+ default=0,
+ help="Do not load logging configuration from the config file")
+
def command(self):
"""Main command to create a new shell"""
self.verbose = 3
@@ -403,9 +409,10 @@ def command(self):
banner += " %-10s - %s\n" % ('app',
'paste.fixture wrapped around wsgiapp')
- # Configure logging from the config file
- self.logging_file_config(config_file)
-
+ if not self.options.quiet:
+ # Configure logging from the config file
+ self.logging_file_config(config_file)
+
try:
if self.options.disable_ipython:
raise ImportError()
@@ -413,7 +420,7 @@ def command(self):
# try to use IPython if possible
from IPython.Shell import IPShellEmbed
- shell = IPShellEmbed()
+ shell = IPShellEmbed(argv=self.args)
shell.set_banner(shell.IP.BANNER + '\n\n' + banner)
try:
shell(local_ns=locs, global_ns={})
Please sign in to comment.
Something went wrong with that request. Please try again.