From d7f086eb12fac8d5aa1d723cb37aabbdce34f69f Mon Sep 17 00:00:00 2001 From: Kazuki Suzuki Przyborowski Date: Fri, 27 Mar 2020 03:33:26 -0500 Subject: [PATCH] Update pywwwget.py --- pywwwget.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pywwwget.py b/pywwwget.py index 1eada04..5eda40a 100755 --- a/pywwwget.py +++ b/pywwwget.py @@ -828,8 +828,9 @@ if(havemechanize==True): fulldatasize = 0; log.info("Moving file "+tmpfilename+" to "+filepath); exec_time_start = time.time(); - log.info("It took "+hms_string(exec_time_start - exec_time_end)+" to move file."); shutil.move(tmpfilename, filepath); + exec_time_end = time.time(); + log.info("It took "+hms_string(exec_time_start - exec_time_end)+" to move file."); if(os.path.exists(tmpfilename)==True): os.remove(tmpfilename); returnval = {'Type': "File", 'Filename': filepath, 'Filesize': downloadsize, 'FilesizeAlt': {'IEC': get_readable_size(downloadsize, 2, "IEC"), 'SI': get_readable_size(downloadsize, 2, "SI")}, 'DownloadTime': pretmpfilename['DownloadTime'], 'DownloadTimeReadable': pretmpfilename['DownloadTimeReadable'], 'MoveFileTime': float(exec_time_start - exec_time_end), 'MoveFileTimeReadable': hms_string(exec_time_start - exec_time_end), 'Headers': pretmpfilename['Headers'], 'URL': pretmpfilename['URL'], 'Code': pretmpfilename['Code']}; -- 2.11.4.GIT