mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Rename import/export functions
They no longer mention the version number in their function names. I'd rather have named them import/export but that gave a name clash with Python's 'import' keyword. Contributes to issue CURA-844.
This commit is contained in:
parent
fdf37c2ab0
commit
f2f993916d
3 changed files with 8 additions and 8 deletions
|
@ -12,7 +12,7 @@ import io #To write config files to strings as if they were files.
|
|||
# \param serialised The serialised form of a machine instance in version 1.
|
||||
# \return A machine instance instance, or None if the file format is
|
||||
# incorrect.
|
||||
def importVersion1(serialised):
|
||||
def importFrom(serialised):
|
||||
try:
|
||||
return MachineInstance(serialised)
|
||||
except (configparser.Error, SettingsError.InvalidFormatError, SettingsError.InvalidVersionError):
|
||||
|
@ -57,7 +57,7 @@ class MachineInstance:
|
|||
#
|
||||
# \return A serialised form of this machine instance, serialised in
|
||||
# version 2 of the file format.
|
||||
def exportVersion2(self):
|
||||
def exportTo(self):
|
||||
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
||||
config = configparser.ConfigParser(interpolation = None) # Build a config file in the form of version 2.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue