Mercurial > repos > ecology > argo_getdata
comparison check.py @ 3:4b84de936c51 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:53 +0000 | 
| parents | f3c64a15ee7e | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 2:f3c64a15ee7e | 3:4b84de936c51 | 
|---|---|
| 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}") | 
