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/10/27 07:40:22 UTC
[incubator-datalab] 01/01: [DATALAB-1527]: added default variable
value
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DATALAB-1527
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 64865d4dbb7c82ffc9df00baa389bda0183bfb5e
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Oct 27 10:40:07 2021 +0300
[DATALAB-1527]: added default variable value
---
.../src/general/lib/os/debian/common_lib.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 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 2d819e4..71a1f32 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -31,7 +31,7 @@ import time
import subprocess
import datalab.fab
-def handle_dpkg_lock(error, rerun=False):
+def handle_dpkg_lock(error='', rerun=False):
try:
count = 0
if 'E: Could not get lock ' and 'It is held by process ' in error:
@@ -69,7 +69,7 @@ def handle_dpkg_lock(error, rerun=False):
except:
sys.exit(1)
-def handle_apt_lock(error, rerun=False):
+def handle_apt_lock(error='', rerun=False):
try:
count = 0
if 'E: Could not get lock ' and 'It is held by process ' in error:
@@ -102,7 +102,7 @@ def handle_apt_lock(error, rerun=False):
except:
sys.exit(1)
-def handle_apt_get_lock(error, rerun=False):
+def handle_apt_get_lock(error='', rerun=False):
try:
count = 0
if 'E: Could not get lock ' and 'It is held by process ' in error:
@@ -181,7 +181,7 @@ def manage_pkg(command, environment, requisites):
error_parser))
err = datalab.fab.conn.sudo('cat /tmp/apt.log').stdout
if 'no_lock' not in err:
- handle_dpkg_lock(err)
+ handle_dpkg_lock()
handle_apt_lock(err, rerun=True)
datalab.fab.conn.sudo('apt-get {0} {1} 2>&1 | tee /tmp/tee.tmp; '
@@ -197,8 +197,8 @@ def manage_pkg(command, environment, requisites):
err = datalab.fab.conn.sudo('cat /tmp/apt_get.log').stdout
if 'no_lock' not in err:
- handle_dpkg_lock(err)
- handle_apt_lock(err)
+ handle_dpkg_lock()
+ handle_apt_lock()
handle_apt_get_lock(err, rerun=True)
allow = True
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org