Skip to content

Commit

Permalink
Fix indentation to move the remove function outside of the loop because
Browse files Browse the repository at this point in the history
it only needs to be done once.
  • Loading branch information
diegopradogesto committed Jul 4, 2018
1 parent ed882b9 commit 71ca5f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cura/CuraPackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ def _installPackage(self, installation_package_data: dict):
continue
self.__installPackageFiles(package_id, src_dir_path, dst_dir_path)

# Remove the file
try:
os.remove(filename)
except Exception:
Logger.log("w", "Tried to delete file [%s], but it failed", filename)
# Remove the file
try:
os.remove(filename)
except Exception:
Logger.log("w", "Tried to delete file [%s], but it failed", filename)

# Move the info to the installed list of packages only when it succeeds
self._installed_package_dict[package_id] = self._to_install_package_dict[package_id]
Expand Down

0 comments on commit 71ca5f3

Please sign in to comment.