|
|
67590c |
From d210f4b6c23d2739f76f9ab348090bcf350c5177 Mon Sep 17 00:00:00 2001
|
|
|
67590c |
From: Eduardo Otubo <otubo@redhat.com>
|
|
|
67590c |
Date: Mon, 31 Aug 2020 09:44:05 +0200
|
|
|
67590c |
Subject: [PATCH] Changing notation of subp call
|
|
|
67590c |
|
|
|
67590c |
RH-Author: Eduardo Otubo <otubo@redhat.com>
|
|
|
67590c |
Message-id: <20200824142252.16298-1-otubo@redhat.com>
|
|
|
67590c |
Patchwork-id: 98215
|
|
|
67590c |
O-Subject: [RHEL-7.9.z/RHEL-8.2.1/RHEL-8.3.0 cloud-init PATCH] Changing notation of subp call
|
|
|
67590c |
Bugzilla: 1839662
|
|
|
67590c |
RH-Acked-by: Cathy Avery <cavery@redhat.com>
|
|
|
67590c |
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
|
|
|
67590c |
|
|
|
67590c |
The previous patch was applied upstream on top of a refactoring that moves subp
|
|
|
67590c |
to its own module (3c551f6e, Move subp into its own module. (#416), release
|
|
|
67590c |
20.2).
|
|
|
67590c |
|
|
|
67590c |
Downstream we're not there yet, in order to avoid applying the above
|
|
|
67590c |
commit and add a huge refactoring, I'll just change this call and we can
|
|
|
67590c |
benefit of this changes in a future rebase.
|
|
|
67590c |
|
|
|
67590c |
x-downstream-only: yes
|
|
|
67590c |
|
|
|
67590c |
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
|
|
|
67590c |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
67590c |
---
|
|
|
67590c |
cloudinit/sources/helpers/vmware/imc/guestcust_util.py | 4 ++--
|
|
|
67590c |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
67590c |
|
|
|
67590c |
diff --git a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
|
|
|
67590c |
index a270d9f..816f52e 100644
|
|
|
67590c |
--- a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
|
|
|
67590c |
+++ b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
|
|
|
67590c |
@@ -136,8 +136,8 @@ def get_tools_config(section, key, defaultVal):
|
|
|
67590c |
cmd = ['vmware-toolbox-cmd', 'config', 'get', section, key]
|
|
|
67590c |
|
|
|
67590c |
try:
|
|
|
67590c |
- (outText, _) = subp.subp(cmd)
|
|
|
67590c |
- except subp.ProcessExecutionError as e:
|
|
|
67590c |
+ (outText, _) = util.subp(cmd)
|
|
|
67590c |
+ except util.ProcessExecutionError as e:
|
|
|
67590c |
if e.exit_code == 69:
|
|
|
67590c |
logger.debug(
|
|
|
67590c |
"vmware-toolbox-cmd returned 69 (unavailable) for cmd: %s."
|
|
|
67590c |
--
|
|
|
67590c |
1.8.3.1
|
|
|
67590c |
|