From c2775adaf54fc0b4da85394f85ddb3f1b0257a93 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Thu, 25 Oct 2018 15:36:14 +0300 Subject: [PATCH] transfer: Make exceptions more verbose. Fix broken download --- pupy/packages/all/transfer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pupy/packages/all/transfer.py b/pupy/packages/all/transfer.py index 5453b850..db941397 100644 --- a/pupy/packages/all/transfer.py +++ b/pupy/packages/all/transfer.py @@ -33,6 +33,7 @@ if scandir is None: import rpyc import sys +import traceback try: import umsgpack as msgpack @@ -571,6 +572,9 @@ class Transfer(object): del stats[:] def _is_supported_archive(self, filepath): + if not ':' in filepath: + return False + ext, archive_path, sub_path = filepath.split(':', 2) if filepath.startswith(('zip:', 'tar:')) \ @@ -683,7 +687,7 @@ class Transfer(object): yield { F_TYPE: T_EXC, F_EXC: str(type(e)), - F_DATA: str(e) + F_DATA: str(e) + traceback.format_exc(limit=20) } def _submit_command(self, command, args, callback):