Skip to content

Commit b329b00

Browse files
[Bug][zos_copy] Avoid using opercmd if data set does not exist (#1623)
* Replace use of pipes for shlex * Remove import of pipes due to use of Python 2 * Add changelog fragment * Remove import of PY3 * Add special symbols workaround * Fix syntax error * Fix another syntax error * Fix pep8 issues * Add ZOAUResponse to keep compatibility * Fix ZOAU exception * Added code change * Added changelog --------- Co-authored-by: Ivan Moreno <[email protected]>
1 parent 417ef1b commit b329b00

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bugfixes:
2+
- zos_copy - module would use opercmd to check if a non existent
3+
destination data set is locked. Fix now only checks if the destination
4+
is already present.
5+
(https://github.com/ansible-collections/ibm_zos_core/pull/1623).

plugins/modules/zos_copy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3496,7 +3496,7 @@ def run_module(module, arg_def):
34963496
# the machine and not generate a false positive check the disposition
34973497
# for try to write in dest and if both src and dest are in lock.
34983498
# ********************************************************************
3499-
if dest_ds_type != "USS":
3499+
if dest_exists and dest_ds_type != "USS":
35003500
if not force_lock:
35013501
is_dest_lock = data_set_locked(dest_name)
35023502
if is_dest_lock:

0 commit comments

Comments
 (0)