From eaa2ca03a10e8a2827922bb467b477c11f8cc51e Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Sun, 29 Mar 2020 17:04:05 +0200 Subject: [PATCH 1/2] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9928b893..100da0d8 100644 --- a/README.md +++ b/README.md @@ -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: From 4421a5c3e18e76d695f5967023fc4417691aa4bf Mon Sep 17 00:00:00 2001 From: lcapocchi Date: Sun, 29 Mar 2020 11:44:03 -0400 Subject: [PATCH 2/2] bug fixe for Repo --- Utilities.py | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Utilities.py b/Utilities.py index fa8a0a2e..0596c873 100644 --- a/Utilities.py +++ b/Utilities.py @@ -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!")) @@ -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!")) @@ -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!")) @@ -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