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

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

commit bf9cce3aae7db4bb116985e0a84958fbd03f9fe4
Author: leonidfrolov <frolovl...@gmail.com>
AuthorDate: Thu Jul 23 16:53:28 2020 +0300

    [DLAB-1961]: changed status 'invalid version' to 'invalid_version'
---
 infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py | 2 +-
 infrastructure-provisioning/src/general/lib/os/fab.py                 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index 8708d08..ee9db26 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -395,7 +395,7 @@ def install_os_pkg(requisites):
             if 'E: Version' in err and 'was not found' in err:
                 versions = sudo ('apt-cache policy {} | grep 500 | grep -v 
Packages'.format(os_pkg.split("=")[0])).replace('\r\n', '').replace(' 500', 
'').replace('     ', ' ').strip().split(' ')
                 if versions != '':
-                    status_msg = 'invalid version'
+                    status_msg = 'invalid_version'
             else:
                 versions = []
                 status_msg = 'failed'
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py 
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 1592313..576021d 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -96,7 +96,7 @@ def install_pip_pkg(requisites, pip_version, lib_group):
                 versions = err[err.find("(from versions: ") + 16: 
err.find(")\r\n")]
                 if versions != '':
                     versions = versions.split(', ')
-                    status_msg = 'invalid version'
+                    status_msg = 'invalid_version'
                 else:
                     versions = []
 
@@ -452,7 +452,7 @@ def install_r_pkg(requisites):
                 sudo('R -e \'install.packages("versions", 
repos="https://cloud.r-project.org";, dep=TRUE)\'')
                 versions = sudo('R -e \'library(versions); 
available.versions("' + name + '")\' 2>&1 | grep -A 50 '
                                     '\'date available\' | awk \'{print 
$2}\'').replace('\r\n', ' ')[5:].split(' ')
-                status_msg = 'invalid version'
+                status_msg = 'invalid_version'
             else:
                 versions = []
             status.append({"group": "r_pkg", "name": name, "version": version, 
"status": status_msg, "error_message": err, "available_versions": versions, 
"add_pkgs": dep})


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

Reply via email to