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/02/18 13:04:43 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: changed err variable assignment

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


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new 9667bf9  [DATALAB-2091]: changed err variable assignment
9667bf9 is described below

commit 9667bf935adbbeb3abaae42d742f703224aec898
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Feb 18 15:04:30 2021 +0200

    [DATALAB-2091]: changed err variable assignment
---
 .../src/general/lib/os/debian/common_lib.py                        | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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 19f3481..14dca3b 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -49,18 +49,17 @@ def manage_pkg(command, environment, requisites):
                         try:
                             error_parser = "locked"
                             print('=========0')
-                            datalab.fab.conn.sudo('dpkg --configure -a 2>&1 | tee /tmp/tee.tmp; if ! grep -w -E "({0}})" /tmp/tee.tmp > '
-                                                  '/tmp/dpkg.log; then echo "" > /tmp/dpkg.log;fi'.format(error_parser))
+                            datalab.fab.conn.sudo('dpkg --configure -a 2>&1 | tee /tmp/tee.tmp; if ! grep -w -E "({0})" /tmp/tee.tmp > '
+                                                  '/tmp/dpkg.log; then echo "no_error" > /tmp/dpkg.log;fi'.format(error_parser))
                             print('----------- install 1')
                             datalab.fab.conn.sudo('ls -la /tmp/')
-                            #err = datalab.fab.conn.sudo('cat /tmp/apt.log')
+                            err = datalab.fab.conn.sudo('cat /tmp/apt.log')
                             print('=========cat /tmp/apt.log')
                             datalab.fab.conn.sudo('cat /tmp/apt.log')
                             print('=========xxd /tmp/apt.log')
                             datalab.fab.conn.sudo('xxd /tmp/apt.log')
                             print('=========')
                             type(datalab.fab.conn.sudo('xxd /tmp/apt.log'))
-                            err = ''
                             count = 0
                             while err != 'no_error' and count < 10:
                                 pid = datalab.fab.conn.sudo('lsof /var/lib/dpkg/lock-frontend | grep dpkg | awk \'{print $2}\'')


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