Let's go all in and use keyword parameters
Way less error prone than positional arguments!
This commit is contained in:
1 parent
b018a56e4c
commit
821fa4299b
1 file changed
+15
-2
@@ -24,7 +24,14 @@ class Main(Daemon):
|
||||
self._logConf = logConf
|
||||
|
||||
def run(self):
|
||||
octoprint = Server(self._configfile, self._basedir, self._host, self._port, self._debug, self._allowRoot, self._logConf, self)
|
||||
octoprint = Server(configfile=self._configfile,
|
||||
basedir=self._basedir,
|
||||
host=self._host,
|
||||
port=self._port,
|
||||
debug=self._debug,
|
||||
allowRoot=self._allowRoot,
|
||||
logConf=self._logConf,
|
||||
octoprint_daemon=self)
|
||||
octoprint.run()
|
||||
|
||||
def main():
|
||||
@@ -77,7 +84,13 @@ def main():
|
||||
elif "restart" == args.daemon:
|
||||
daemon.restart()
|
||||
else:
|
||||
octoprint = Server(args.config, args.basedir, args.host, args.port, args.debug, args.allowRoot, args.logConf)
|
||||
octoprint = Server(configfile=args.config,
|
||||
basedir=args.basedir,
|
||||
host=args.host,
|
||||
port=args.port,
|
||||
debug=args.debug,
|
||||
allowRoot=args.allowRoot,
|
||||
logConf=args.logConf)
|
||||
octoprint.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in new issue
Block a user