mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 00:52:30 -06:00
Apply formatting
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#VERSION: 1.46
|
||||
#VERSION: 1.47
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -45,13 +45,13 @@ def anySizeToBytes(size_string):
|
||||
# separate integer from unit
|
||||
try:
|
||||
size, unit = size_string.split()
|
||||
except:
|
||||
except Exception:
|
||||
try:
|
||||
size = size_string.strip()
|
||||
unit = ''.join([c for c in size if c.isalpha()])
|
||||
if len(unit) > 0:
|
||||
size = size[:-len(unit)]
|
||||
except:
|
||||
except Exception:
|
||||
return -1
|
||||
if len(size) == 0:
|
||||
return -1
|
||||
|
||||
Reference in New Issue
Block a user