You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by ad...@apache.org on 2019/09/04 12:29:30 UTC

[incubator-dlab] 01/01: Hot-fix. Fixing exit after 60 tries.

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

adamsd pushed a commit to branch fix_repo
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 8b0fea15437d681ae43baa9bf6a04b2cd69f8190
Author: AdamsDisturber <ad...@gmail.com>
AuthorDate: Wed Sep 4 15:29:08 2019 +0300

    Hot-fix. Fixing exit after 60 tries.
---
 infrastructure-provisioning/src/general/lib/os/debian/common_lib.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index d7c172d..1e3e82f 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -34,7 +34,10 @@ def ensure_pkg(user, requisites='linux-headers-generic python-pip python-dev '
                                 'libffi-dev unzip libxml2-dev haveged'):
     count = 0
     check = False
-    while check == False and count <= 60:
+    while check == False and count <= 61:
+        if count == 61:
+            print("Repositories are not available. Please, try again later.")
+            sys.exit(1)
         try:
             if not exists('/home/{}/.ensure_dir/pkg_upgraded'.format(user)):
                 print("Updating repositories "


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