[refactor]
This commit is contained in:
parent
a03cc70539
commit
91171d40b6
|
@ -87,11 +87,11 @@ class KlipperPlugin(
|
|||
filepath = os.path.expanduser(
|
||||
self._settings.get(["configuration", "path"])
|
||||
)
|
||||
f = open(filepath)
|
||||
f = open(filepath, "w")
|
||||
f.write(data["config"])
|
||||
f.close()
|
||||
self._logger.info(
|
||||
"Write Klipper config to {}".format(filepath)
|
||||
"Writing Klipper config to {}".format(filepath)
|
||||
)
|
||||
# Restart klipply to reload config
|
||||
self._printer.commands(self._settings.get(["configuration", "reload_command"]))
|
||||
|
@ -286,11 +286,6 @@ class KlipperPlugin(
|
|||
sections = kc.load(data["configFile"])
|
||||
return flask.jsonify(sections)
|
||||
|
||||
def on_api_get(self, request):
|
||||
log_analyzer = KlipperLogAnalyzer.KlipperLogAnalyzer("/tmp/klippy.log.2018-08-06")
|
||||
|
||||
return log_analyzer.analyze()
|
||||
|
||||
def get_update_information(self):
|
||||
return dict(
|
||||
klipper=dict(
|
||||
|
|
Loading…
Reference in New Issue