MCPcopy
hub / github.com/benoitc/gunicorn / init

Method init

gunicorn/app/wsgiapp.py:13–35  ·  view source on GitHub ↗
(self, parser, opts, args)

Source from the content-addressed store, hash-verified

11
12class WSGIApplication(Application):
13 def init(self, parser, opts, args):
14 self.app_uri = None
15
16 if opts.paste:
17 from .pasterapp import has_logging_config
18
19 config_uri = os.path.abspath(opts.paste)
20 config_file = config_uri.split('#')[0]
21
22 if not os.path.exists(config_file):
23 raise ConfigError("%r not found" % config_file)
24
25 self.cfg.set("default_proc_name", config_file)
26 self.app_uri = config_uri
27
28 if has_logging_config(config_file):
29 self.cfg.set("logconfig", config_file)
30
31 return
32
33 if len(args) > 0:
34 self.cfg.set("default_proc_name", args[0])
35 self.app_uri = args[0]
36
37 def load_config(self):
38 super().load_config()

Callers

nothing calls this directly

Calls 4

ConfigErrorClass · 0.90
has_logging_configFunction · 0.85
existsMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected