osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/29597 )


Change subject: obs: run_in_docker_and_exit: remove args param
......................................................................

obs: run_in_docker_and_exit: remove args param

No need to pass args here. It was only used for args.verbose, and that
isn't necessary since we don't need to restore the verbose mode.

Related: OS#2385
Change-Id: I620cdef46e18f4c66644f14003caf2183c89686f
---
M scripts/obs/build_srcpkg.py
M scripts/obs/lib/docker.py
M scripts/obs/update_obs_project.py
3 files changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/97/29597/1

diff --git a/scripts/obs/build_srcpkg.py b/scripts/obs/build_srcpkg.py
index 262ead8..61d8d64 100755
--- a/scripts/obs/build_srcpkg.py
+++ b/scripts/obs/build_srcpkg.py
@@ -31,7 +31,7 @@
     lib.set_cmds_verbose(args.verbose)

     if args.docker:
-        lib.docker.run_in_docker_and_exit(__file__, args)
+        lib.docker.run_in_docker_and_exit(__file__)

     if not args.ignore_req:
         lib.check_required_programs()
diff --git a/scripts/obs/lib/docker.py b/scripts/obs/lib/docker.py
index b4ec157..629f239 100644
--- a/scripts/obs/lib/docker.py
+++ b/scripts/obs/lib/docker.py
@@ -28,7 +28,7 @@
     exit(1)


-def run_in_docker_and_exit(script_path, args, add_oscrc=False):
+def run_in_docker_and_exit(script_path, add_oscrc=False):
     if "INSIDE_DOCKER" in os.environ:
         return

@@ -41,10 +41,10 @@
         oscrc = get_oscrc()

     # Build the docker image. Unless it is up-to-date, this will take a few
-    # minutes or so, therefore print the output.
+    # minutes or so, therefore print the output. No need to restore
+    # set_cmds_verbose, as we use subprocess.run() below and exit afterwards.
     lib.set_cmds_verbose(True)
     build_image()
-    lib.set_cmds_verbose(args.verbose)

     cmd = ["docker", "run",
            "--rm",
diff --git a/scripts/obs/update_obs_project.py 
b/scripts/obs/update_obs_project.py
index 9bd46ff..58e5888 100755
--- a/scripts/obs/update_obs_project.py
+++ b/scripts/obs/update_obs_project.py
@@ -202,7 +202,7 @@
     lib.set_cmds_verbose(args.verbose)

     if args.docker:
-        lib.docker.run_in_docker_and_exit(__file__, args, True)
+        lib.docker.run_in_docker_and_exit(__file__, True)

     lib.osc.check_proj(proj)
     lib.osc.check_oscrc()

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29597
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I620cdef46e18f4c66644f14003caf2183c89686f
Gerrit-Change-Number: 29597
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to