diff --git a/src/sbeam.py b/src/sbeam.py index 4c7a5fb..6d98f8e 100755 --- a/src/sbeam.py +++ b/src/sbeam.py @@ -102,8 +102,8 @@ def receive(host, destination): fullpath = os.path.join(destination, filepath[1:]) os.makedirs(fullpath, exist_ok=True) with open(os.path.join(fullpath, filename), 'wb') as fd: - # TODO split filesize in chunks with remainder fd.write(response.raw.read(int(filesize))) + bar.update(len(filelist)) @cli.command() @@ -153,4 +153,7 @@ def tui(): if __name__ == '__main__': - cli() + try: + cli() + except requests.exceptions.ConnectionError as conerr: + print(f'Failed to connect. Target alive?')