Skip to content

Commit

Permalink
Merge pull request #261 from mgear-dev/appleReinstallFailure
Browse files Browse the repository at this point in the history
Added try, except block
  • Loading branch information
miquelcampos authored Sep 5, 2023
2 parents 86d5868 + ed117ee commit fd24ea1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drag_n_drop_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,14 @@ def start_install(self):

for item in os.listdir(mgear_folder):
# -- move the folder to the install path
shutil.move(os.path.join(
install_path, "mgear", item), install_path)
self.update_logging_widget("Moved: {0}".format(
os.path.join(install_path, item)))
try:
shutil.move(os.path.join(
install_path, "mgear", item), install_path)
self.update_logging_widget("Moved: {0}".format(
os.path.join(install_path, item)))
except OSError as err:
self.update_logging_widget("Warning: Failed to move {0}".format(
os.path.join(install_path, item)))

self.remove_directory(mgear_install_path)

Expand Down

0 comments on commit fd24ea1

Please sign in to comment.