You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/03/02 09:42:45 UTC

[incubator-datalab] 02/02: [DATALAB-2091]: added traceback

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 4d7b5778153f95704ed1e0923abba520550e34c1
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Mar 2 11:42:27 2021 +0200

    [DATALAB-2091]: added traceback
---
 .../src/base/scripts/install_prerequisites.py                      | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
index c3ccb8e..a0b7f90 100644
--- a/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
+++ b/infrastructure-provisioning/src/base/scripts/install_prerequisites.py
@@ -28,6 +28,7 @@ from datalab.common_lib import *
 from datalab.fab import *
 from fabric import *
 from patchwork.files import exists
+import traceback
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--hostname', type=str, default='')
@@ -64,7 +65,11 @@ if __name__ == "__main__":
     update_hosts_file(args.user)
 
     print("Updating repositories and installing requested tools.")
-    ensure_pkg(args.user)
+    try:
+        ensure_pkg(args.user)
+    except:
+        traceback.print_exc()
+        sys.exit(1)
 
     print("Installing python packages: {}".format(args.pip_packages))
     ensure_pip(args.pip_packages)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org