Fixing styling issues

This commit is contained in:
Leonid Mirsky 2014-08-05 15:47:02 +03:00
parent e5edaf4e0b
commit 18f2b6ff91
1 changed files with 9 additions and 6 deletions

View File

@ -124,13 +124,16 @@ class Client(requests.Session):
try: try:
digits = int(mem_limit[:-1]) digits = int(mem_limit[:-1])
except ValueError: except ValueError:
message = ('Failed converting the string value for mem_limit ({0}) to a number.') message = ('Failed converting the string value for'
raise errors.DockerException(message.format(mem_limit[:-1])) ' mem_limit ({0}) to a number.')
formatted_message = message.format(mem_limit[:-1])
raise errors.DockerException(formatted_message)
mem_limit = digits * units[suffix] mem_limit = digits * units[suffix]
else: else:
message = ('The specified value for mem_limit parameter ({0}) should specify' message = ('The specified value for mem_limit parameter'
' the units. The postfix should be one of the `k` `m` `g` characters' ) ' ({0}) should specify the units. The postfix'
' should be one of the `k` `m` `g` characters')
raise errors.DockerException(message.format(mem_limit)) raise errors.DockerException(message.format(mem_limit))
if isinstance(ports, list): if isinstance(ports, list):