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: 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