Implement ServeCommand.{loadserver, loadapp}.
authorBerker Peksag <berker.peksag@gmail.com>
Fri, 15 Aug 2014 20:07:35 +0000 (23:07 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Fri, 15 Aug 2014 20:07:35 +0000 (23:07 +0300)
This is partly port from PasteScript.

mediagoblin/gmg_commands/serve.py

index 44f54697a1c7947b48b7cd73b3e8f2a606f861ca..64400fdd5eaca2897225e1199b868e8d3ab4e9f0 100644 (file)
 
 from __future__ import print_function
 
+from paste.deploy import loadapp, loadserver
+
 
 class ServeCommand(object):
 
-    def loadserver(self, server_spec, name, relative_to, **kw):
-        pass
+    def loadserver(self, server_spec, name, relative_to, **kwargs):
+        return loadserver(server_spec, name=name, relative_to=relative_to,
+                          **kwargs)
 
-    def loadapp(self, app_spec, name, relative_to, **kw):
-        pass
+    def loadapp(self, app_spec, name, relative_to, **kwargs):
+        return loadapp(app_spec, name=name, relative_to=relative_to, **kwargs)
 
     def daemonize(self):
         # TODO: pass to gunicorn if available