summaryrefslogtreecommitdiff
path: root/docker/utils/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/utils/utils.py')
-rw-r--r--docker/utils/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index bca88de..4110017 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -322,6 +322,9 @@ def parse_bytes(s):
if len(s) == 0:
s = 0
else:
+ if s[-2:-1].isalpha() and s[-1].isalpha():
+ if (s[-1] == "b" or s[-1] == "B"):
+ s = s[:-1]
units = BYTE_UNITS
suffix = s[-1].lower()