Skip to content

Commit 18f2b6f

Browse files
committed
Fixing styling issues
1 parent e5edaf4 commit 18f2b6f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docker/client.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,21 @@ def _container_config(self, image, command, hostname=None, user=None,
119119
'm': 1024*1024,
120120
'g': 1024*1024*1024}
121121
suffix = mem_limit[-1].lower()
122-
122+
123123
if suffix in units.keys():
124124
try:
125-
digits = int(mem_limit[:-1])
125+
digits = int(mem_limit[:-1])
126126
except ValueError:
127-
message = ('Failed converting the string value for mem_limit ({0}) to a number.')
128-
raise errors.DockerException(message.format(mem_limit[:-1]))
127+
message = ('Failed converting the string value for'
128+
' mem_limit ({0}) to a number.')
129+
formatted_message = message.format(mem_limit[:-1])
130+
raise errors.DockerException(formatted_message)
129131

130132
mem_limit = digits * units[suffix]
131133
else:
132-
message = ('The specified value for mem_limit parameter ({0}) should specify'
133-
' the units. The postfix should be one of the `k` `m` `g` characters' )
134+
message = ('The specified value for mem_limit parameter'
135+
' ({0}) should specify the units. The postfix'
136+
' should be one of the `k` `m` `g` characters')
134137
raise errors.DockerException(message.format(mem_limit))
135138

136139
if isinstance(ports, list):

0 commit comments

Comments
 (0)