diff options
author | Simon Edwards <s.edwards@ultimaker.com> | 2017-02-26 22:40:32 +0300 |
---|---|---|
committer | Simon Edwards <s.edwards@ultimaker.com> | 2017-02-26 23:05:09 +0300 |
commit | 4ab6b74930f5a15a0c13d91236f09cdeee736e8d (patch) | |
tree | 2c856f0d29033c45327f8d659224a5d0e1fa1cb5 /plugins/VersionUpgrade/VersionUpgrade21to22 | |
parent | 7bb486a34bb2f36b21692f40cfdf970c048ff27a (diff) |
Fixed a bunch of error which were reported by PyCharm's code analysis.
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade21to22')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py | 4 | ||||
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py index 4491a00d3d..faf9105cff 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py @@ -3,7 +3,7 @@ import UM.VersionUpgrade #To indicate that a file is of incorrect format. import UM.VersionUpgradeManager #To schedule more files to be upgraded. -import UM.Resources #To get the config storage path. +from UM.Resources import Resources #To get the config storage path. import configparser #To read config files. import io #To write config files to strings as if they were files. @@ -107,7 +107,7 @@ class MachineInstance: user_profile["values"] = {} version_upgrade_manager = UM.VersionUpgradeManager.VersionUpgradeManager.getInstance() - user_storage = os.path.join(UM.Resources.getDataStoragePath(), next(iter(version_upgrade_manager.getStoragePaths("user")))) + user_storage = os.path.join(Resources.getDataStoragePath(), next(iter(version_upgrade_manager.getStoragePaths("user")))) user_profile_file = os.path.join(user_storage, urllib.parse.quote_plus(self._name) + "_current_settings.inst.cfg") if not os.path.exists(user_storage): os.makedirs(user_storage) diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py index 3bff7c1bf5..7cc404de6b 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py @@ -3,6 +3,8 @@ import configparser #To read config files. import io #To write config files to strings as if they were files. +from typing import Dict +from typing import List import UM.VersionUpgrade from UM.Logger import Logger |