diff --git a/klippy/extras/save_variables.py b/klippy/extras/save_variables.py index 8a6e9bec..6c88e3cf 100644 --- a/klippy/extras/save_variables.py +++ b/klippy/extras/save_variables.py @@ -4,7 +4,7 @@ # Copyright (C) 2016-2020 Kevin O'Connor # # This file may be distributed under the terms of the GNU GPLv3 license. -import os, logging, ast, ConfigParser +import os, logging, ast, ConfigParser as configparser class SaveVariables: def __init__(self, config): @@ -20,7 +20,7 @@ class SaveVariables: desc=self.cmd_SAVE_VARIABLE_help) def loadVariables(self): allvars = {} - varfile = ConfigParser.ConfigParser() + varfile = configparser.ConfigParser() try: varfile.read(self.filename) if varfile.has_section('Variables'): @@ -42,7 +42,7 @@ class SaveVariables: newvars = dict(self.allVariables) newvars[varname] = value # Write file - varfile = ConfigParser.ConfigParser() + varfile = configparser.ConfigParser() varfile.add_section('Variables') for name, val in sorted(newvars.items()): varfile.set('Variables', name, repr(val))