From 5e9fb86f9f7dd0a357825c38b42b0f4bd289b6bd Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Mon, 7 Apr 2025 10:53:29 +0200 Subject: [PATCH] refs #1802 fix functions/ogCopyFile args handling --- CHANGELOG.md | 6 ++++++ ogclient/functions/ogCopyFile | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b265a8..aa3ac2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.2] - 2025-04-07 + +### Fixed + +- Handle invalid number of arguments pass to functions/ogCopyFile + ## [0.3.1] - 2025-04-03 ### Fixed diff --git a/ogclient/functions/ogCopyFile b/ogclient/functions/ogCopyFile index 04f1784..f65663b 100755 --- a/ogclient/functions/ogCopyFile +++ b/ogclient/functions/ogCopyFile @@ -55,6 +55,9 @@ elif 6 == len (sys.argv): args = parser.parse_args() src = { 'container': args.src_container, 'file': args.src_file } dst = { 'disk': args.dst_disk, 'par': args.dst_par, 'file': args.dst_file } +else: + ogHelp ('ogCopyFile', 'ogCopyFile [ str_repo | int_ndisk int_npartition ] path_source [ str_repo | int_ndisk int_npartition ] path_target', ['ogCopyFile REPO newfile.txt 1 2 /tmp/newfile.txt']) + sys.exit (1) ret = ogCopyFile (src, dst) if ret is not None: