Skip to content
Browse files

Adding handling for the --profile flag

  • Loading branch information...
1 parent fa95117 commit 5badedf88bc5ecacd21167c4da0c0c015c43b767 Jason Baker committed Aug 30, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 shrapnel/command.py
View
6 shrapnel/command.py
@@ -7,7 +7,7 @@
Copyright (c) 2010 Medium Entertainment, Inc. All rights reserved.
"""
-import config
+from shrapnel import config
import logging
import logging.handlers
import optparse
@@ -16,6 +16,7 @@
import sys
import tornado.httpserver
import tornado.ioloop
+from tornado.options import options as tornado_options, parse_command_line
import tornado.web
import shrapnel.classtools
@@ -81,12 +82,13 @@ def run(self):
help='Turn profiling off',
)
+ parse_command_line([])
for args, kwargs in self.cmd_options:
parser.add_option(*args, **kwargs)
self.options, args = parser.parse_args()
if self.options.profile is not None:
- config.instance('app')['profile']=self.options.profile
+ tornado_options.enable_appstats=self.options.profile
os.chdir(self.path)
# tornado.locale.load_translations(

0 comments on commit 5badedf

Please sign in to comment.
Something went wrong with that request. Please try again.