diff options
author | NeodarZ <neodarz@neodarz.net> | 2017-10-15 14:40:29 +0200 |
---|---|---|
committer | NeodarZ <neodarz@neodarz.net> | 2017-10-15 14:40:29 +0200 |
commit | cb93e8e1cdf735c5e7cd4dc65abe4c527d05ae3d (patch) | |
tree | 84b5650604bce7a5960c4a3ca8043693a5a35e0e | |
parent | ae6f102bed45a666162a7cc5210ddab3220ff83c (diff) | |
download | convert.py-cb93e8e1cdf735c5e7cd4dc65abe4c527d05ae3d.tar.xz convert.py-cb93e8e1cdf735c5e7cd4dc65abe4c527d05ae3d.zip |
Get more solid test for get time
-rwxr-xr-x | convert.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -88,7 +88,7 @@ for file in sorted(os.listdir(sourcedir)): totalRange = time.strptime(total.split('.')[0],'%H:%M:%S') totalRangeS = datetime.timedelta(hours=totalRange.tm_hour,minutes=totalRange.tm_min,seconds=totalRange.tm_sec).total_seconds() if re.match(r'.*time=.*', str(unknown_line)): - timeRange = time.strptime(str(unknown_line).split("=")[2].split()[0].split('.')[0],'%H:%M:%S') + timeRange = time.strptime(str(unknown_line).partition("time=")[2].split('.')[0],'%H:%M:%S') timeRangeS = datetime.timedelta(hours=timeRange.tm_hour,minutes=timeRange.tm_min,seconds=timeRange.tm_sec).total_seconds() print(str(round(100*timeRangeS/totalRangeS, 1))+"% / 100% "+str(exist), end='\r') |