Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ All dependencies can be installed using pip with the requirements.txt file:
$ pip install -r requirements.txt
```

An XUbuntu 19.10 virtual machine including DEVSimPy can be donwloaded from [DEVSimPy-on-XUbuntu19.10.ova](https://mycore.core-cloud.net/index.php/s/D9JDrN62E0MUCPq/download). The login and password of the distribution are: devsimpyuser/devsimpy. If you want to have the latest version of DEVSimPy, please execute 'git pull' in the DEVSimPy directory before starting or start DEVSimPy by double clicking on the desktop icon and go to Help->Update->From Git Repository (pull).
An XUbuntu 19.10 virtual machine including DEVSimPy can be donwloaded from [DEVSimPy-on-XUbuntu19.10.ova](https://mycore.core-cloud.net/index.php/s/D9JDrN62E0MUCPq/download). The login and password of the distribution (root) are: devsimpy-user/devsimpy. If you want to have the latest version of DEVSimPy, please execute 'git pull' in the DEVSimPy directory before starting or start DEVSimPy by double clicking on the desktop icon and go to Help->Update->From Git Repository (pull).

# Usage
To execute DEVSimPy:
Expand Down
33 changes: 25 additions & 8 deletions Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,15 @@ def updateFromGitRepo():

try:
pub.sendMessage("to_progress_diag", message=_("Pull..."))
repo = git.Repo()
repo = git.Repo(HOME_PATH)
o = repo.remotes.origin
o.pull()
except Exception as e:
print(e)
except Exception as err:
print('print_exc():')
traceback.print_exc(file=sys.stdout)
print('\n')
print('print_exc(1):')
traceback.print_exc(limit=1, file=sys.stdout)
return False
else:
pub.sendMessage("to_progress_diag", message=_("Done!"))
Expand All @@ -290,7 +294,12 @@ def updateFromGitArchive():
zipf = ZipFile(os.path.join(tempdir,''.join(['DEVSimPy-backup-',now.strftime("%m_%d_%Y"),'.zip'])), 'w', ZIP_DEFLATED)
zipdir(os.getcwd(), zipf)
zipf.close()
except:
except Exception as err:
print('print_exc():')
traceback.print_exc(file=sys.stdout)
print('\n')
print('print_exc(1):')
traceback.print_exc(limit=1, file=sys.stdout)
return False
else:
pub.sendMessage("to_progress_diag", message=_(f"Done!"))
Expand Down Expand Up @@ -318,7 +327,12 @@ def updateFromGitArchive():
src = pathlib.Path(os.path.join(tempdir, 'DEVSimPy-master'))
dest = pathlib.Path(os.path.join(tempdir, os.getcwd()))
copy_dir(src, dest)
except:
except Exception as err:
print('print_exc():')
traceback.print_exc(file=sys.stdout)
print('\n')
print('print_exc(1):')
traceback.print_exc(limit=1, file=sys.stdout)
return False

pub.sendMessage("to_progress_diag", message=_("Done!"))
Expand Down Expand Up @@ -362,9 +376,12 @@ def updatePiPPackages():

try:
run_command(command, "to_progress_diag")

except Exception as ee:
print(ee.output)
except Exception as err:
print('print_exc():')
traceback.print_exc(file=sys.stdout)
print('\n')
print('print_exc(1):')
traceback.print_exc(limit=1, file=sys.stdout)
return False
else:
return True
Expand Down