Rename path to configpath

Rename path to configpath to match naming scheme of logpath
This commit is contained in:
Alice Grey 2020-08-30 10:43:54 -05:00
parent 0141b5e130
commit 53cb69e416
1 changed files with 20 additions and 20 deletions

View File

@ -72,7 +72,7 @@ class KlipperPlugin(
)] )]
), ),
configuration = dict( configuration = dict(
path="~/printer.cfg", configpath="~/printer.cfg",
logpath="/tmp/klippy.log", logpath="/tmp/klippy.log",
reload_command="RESTART" reload_command="RESTART"
) )
@ -82,7 +82,7 @@ class KlipperPlugin(
data = octoprint.plugin.SettingsPlugin.on_settings_load(self) data = octoprint.plugin.SettingsPlugin.on_settings_load(self)
filepath = os.path.expanduser( filepath = os.path.expanduser(
self._settings.get(["configuration", "path"]) self._settings.get(["configuration", "configpath"])
) )
try: try:
f = open(filepath, "r") f = open(filepath, "r")
@ -98,7 +98,7 @@ class KlipperPlugin(
if "config" in data: if "config" in data:
try: try:
filepath = os.path.expanduser( filepath = os.path.expanduser(
self._settings.get(["configuration", "path"]) self._settings.get(["configuration", "configpath"])
) )
data["config"] = data["config"].encode('utf-8') data["config"] = data["config"].encode('utf-8')
@ -123,7 +123,7 @@ class KlipperPlugin(
return dict( return dict(
admin=[ admin=[
["connection", "port"], ["connection", "port"],
["configuration", "path"], ["configuration", "configpath"],
["configuration", "replace_connection_panel"] ["configuration", "replace_connection_panel"]
], ],
user=[ user=[