Skip to content

Commit c6dfbf6

Browse files
authored
fix: Added check for commit_response text parsing (#557)
1 parent 68e7a1c commit c6dfbf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

panos/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4900,7 +4900,7 @@ def _commit(
49004900
except AttributeError:
49014901
if exception:
49024902
raise err.PanCommitNotNeeded("Commit not needed", pan_device=self)
4903-
else:
4903+
elif commit_response.find("./msg/line") is not None:
49044904
# By getting here, there was no "./result/job" in the commit response,
49054905
# and there was no exception raised either, so capture the response message
49064906
commit_response_msg = commit_response.find("./msg/line").text
@@ -4921,6 +4921,7 @@ def _commit(
49214921
"messages": [commit_response_msg],
49224922
}
49234923
return log_collector_group_push_result
4924+
else:
49244925
return
49254926
if not sync:
49264927
# Don't synchronize, just return

0 commit comments

Comments
 (0)