Mercurial > repos > ecology > copernicusmarine
comparison check.py @ 3:87ae77f2bd5a draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean commit ecc01d1975d2a603ece634c6cfe2d9591b307cc8
author | ecology |
---|---|
date | Thu, 20 Mar 2025 14:49:58 +0000 |
parents | 4de886e6300d |
children |
comparison
equal
deleted
inserted
replaced
2:c07f11d8e49a | 3:87ae77f2bd5a |
---|---|
74 is_valid, error_message = validate_command(command) | 74 is_valid, error_message = validate_command(command) |
75 if not is_valid: | 75 if not is_valid: |
76 print(error_message) | 76 print(error_message) |
77 sys.exit(1) | 77 sys.exit(1) |
78 | 78 |
79 # Append '--force-download' option to the command | |
80 if "--force-download" not in command: | |
81 command += " --force-download" | |
82 | |
79 # Execute the command | 83 # Execute the command |
80 try: | 84 try: |
81 subprocess.run(command, shell=True, check=True) | 85 subprocess.run(command, shell=True, check=True) |
82 except subprocess.CalledProcessError as e: | 86 except subprocess.CalledProcessError as e: |
83 print(f"Error: Command failed with exit code {e.returncode}") | 87 print(f"Error: Command failed with exit code {e.returncode}") |