Skip to content

Commit

Permalink
Merge pull request #5 from iarsov/minor-fixes
Browse files Browse the repository at this point in the history
Minor bug fixes
  • Loading branch information
iarsov committed Aug 3, 2020
2 parents d533489 + 86825ed commit 6ed5e3b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions library/orapatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
@author: Ivica Arsov
@contact: https://blog.iarsov.com/contact
@last_update: 23.12.2019
@last_update: 03.08.2020
File name: orapatch.py
Version: 2.0.1
Version: 2.0.2
Purpose: Automation for Oracle software binaries patching
Author: Ivica Arsov (ivica@iarsov.com)
Copyright: (c) Ivica Arsov - https://blog.iarsov.com - All rights reserved.
Expand Down Expand Up @@ -635,7 +635,12 @@ def run_os_command(self, p_command, p_expect = False):
v_output, v_error = process.communicate()

v_output = v_output.decode('ascii').strip()
v_error = v_error.decode('ascii').strip()

try:
v_error = v_error.decode('ascii').strip()
except AttributeError:
# if "v_error" returns 0
pass

if g_debug:
logger("---------------------------", True)
Expand Down Expand Up @@ -789,6 +794,8 @@ def check_conflict_against_oh(self):
#
def patch_oh(self):

self.set_env(self.oracle_home)

# start: "if self.is_crs"
if self.is_crs:

Expand Down Expand Up @@ -1296,7 +1303,7 @@ def build_instance_list(self):

# Get 1st key from "v_oratab_asm_sid_match"
# - since it's GI, we're assuming only one ASM per GI.
v_asm_sid = v_oratab_asm_sid_match.keys()[0]
v_asm_sid = list(v_oratab_asm_sid_match.keys())[0]

# Check if ASM is running
v_command = "ps -ef | grep -iw [a]sm_pmon_" + v_asm_sid + " | wc -l"
Expand Down

0 comments on commit 6ed5e3b

Please sign in to comment.