From fb5d75e1ab0e469e031ccaee1136b6e251594f45 Mon Sep 17 00:00:00 2001 From: Gowtham Anandha Babu Date: Wed, 2 Dec 2015 19:55:49 +0530 Subject: test: Fix ftp-client not printing progress This patch fixes the keyError while printing transfer progress. --- test/ftp-client | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/ftp-client b/test/ftp-client index 78c32b3f7..4540602a0 100755 --- a/test/ftp-client +++ b/test/ftp-client @@ -77,16 +77,18 @@ class FtpClient: if path != self.transfer_path: return - if properties['Status'] == 'complete' or \ - properties['Status'] == 'error': + if "Status" in properties and \ + (properties['Status'] == 'complete' or \ + properties['Status'] == 'error'): if self.verbose: print("Transfer %s" % properties['Status']) mainloop.quit() return - if properties["Transferred"] == None: + if "Transferred" not in properties: return + value = properties["Transferred"] speed = (value - self.transferred) / 1000 print("Transfer progress %d/%d at %d kBps" % (value, self.transfer_size, -- cgit v1.2.1