diff options
author | John Estabrook <jestabro@vyos.io> | 2023-12-13 13:13:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 13:13:59 -0600 |
commit | 671d012af37729601d3cdfba65beb1daf68229a3 (patch) | |
tree | b2d1dca2978cb7306f9652ad058e262a287114c7 /python | |
parent | 8434cc7c7a6eaec754d7873e4f61551143cd26b2 (diff) | |
parent | 6b325962a4b8b3e67d7976bf161aed34a9fe6cce (diff) | |
download | vyos-1x-671d012af37729601d3cdfba65beb1daf68229a3.tar.gz vyos-1x-671d012af37729601d3cdfba65beb1daf68229a3.zip |
Merge pull request #2628 from jestabro/ftp-archive
T5774: fix regression in remote.upload
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/config_mgmt.py | 11 | ||||
-rw-r--r-- | python/vyos/remote.py | 2 |
2 files changed, 3 insertions, 10 deletions
diff --git a/python/vyos/config_mgmt.py b/python/vyos/config_mgmt.py index fd0fa7a75..e57129ce5 100644 --- a/python/vyos/config_mgmt.py +++ b/python/vyos/config_mgmt.py @@ -386,15 +386,8 @@ Proceed ?''' _, _, netloc = url.netloc.rpartition("@") redacted_location = urlunsplit(url._replace(netloc=netloc)) print(f" {redacted_location}", end=" ", flush=True) - try: - upload(archive_config_file, f'{location}/{remote_file}', - source_host=source_address, raise_error=True) - print("OK") - except Exception as e: - print("FAILED!") - print() - print(indent(str(e), " > ")) - print() + upload(archive_config_file, f'{location}/{remote_file}', + source_host=source_address) # op-mode functions # diff --git a/python/vyos/remote.py b/python/vyos/remote.py index fec44b571..b1efcd10b 100644 --- a/python/vyos/remote.py +++ b/python/vyos/remote.py @@ -452,7 +452,7 @@ def upload(local_path, urlstring, progressbar=False, source_host='', source_port=0, timeout=10.0): try: progressbar = progressbar and is_interactive() - urlc(urlstring, progressbar, source_host, source_port, timeout).upload(local_path) + urlc(urlstring, progressbar, False, source_host, source_port, timeout).upload(local_path) except Exception as err: print_error(f'Unable to upload "{urlstring}": {err}') except KeyboardInterrupt: |