Better output & first part of new config handling

Changes:
- better output when downloading files
- optimization when getting values from the config
This commit is contained in:
Neocky
2021-03-26 20:24:15 +01:00
parent e8e46bb014
commit 17611c741e
5 changed files with 133 additions and 87 deletions

View File

@@ -6,7 +6,7 @@ import requests
from pathlib import Path
from utils.consoleoutput import oColors
from handlers.handle_config import checkConfig
from handlers.handle_config import checkConfig, configurationValues
from handlers.handle_sftp import createSFTPConnection
@@ -160,3 +160,9 @@ def calculateFileSizeMb(downloadFileSize):
fileSizeMb = fileSizeDownload / 1024 / 1024
roundedFileSize = round(fileSizeMb, 2)
return roundedFileSize
def calculateFileSizeKb(downloadFileSize):
fileSizeDownload = int(downloadFileSize)
fileSizeKb = fileSizeDownload / 1024
roundedFileSize = round(fileSizeKb, 2)
return roundedFileSize