Skip to content
Browse files

Merge branch 'master' of github.com:kurtiss/shrapnel

  • Loading branch information...
2 parents e43d08c + 6ed5b0d commit baace5554c9fde46bf0aae77bbaabf46f12c1e39 @kurtiss committed
Showing with 7 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +6 −2 shrapnel/command.py
View
1 .gitignore
@@ -28,6 +28,7 @@ develop-eggs
*prof*
pip-log.txt
*.pyc
+*.pyo
# test cruft
*_test
View
8 shrapnel/command.py
@@ -20,6 +20,7 @@
class ShrapnelApplication(object):
+ cmd_options = []
def get_tornado_server(self, application):
return tornado.httpserver.HTTPServer(application)
@@ -67,7 +68,10 @@ def run(self):
help = "The path to a file which will contain the server's informational log messages."
)
- options, args = parser.parse_args()
+ for args, kwargs in self.cmd_options:
+ parser.add_option(*args, **kwargs)
+
+ self.options, args = parser.parse_args()
os.chdir(self.path)
# tornado.locale.load_translations(
@@ -76,7 +80,7 @@ def run(self):
signal.signal(signal.SIGINT, self._do_signal)
signal.signal(signal.SIGTERM, self._do_signal)
- self.start(options)
+ self.start(self.options)
def _daemonize(self, options):
# http://code.activestate.com/recipes/278731/

0 comments on commit baace55

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