mirror of https://github.com/docker/docker-py.git
				
				
				
			Fixing styling issues
This commit is contained in:
		
							parent
							
								
									e5edaf4e0b
								
							
						
					
					
						commit
						18f2b6ff91
					
				|  | @ -119,18 +119,21 @@ class Client(requests.Session): | ||||||
|                          'm': 1024*1024, |                          'm': 1024*1024, | ||||||
|                          'g': 1024*1024*1024} |                          'g': 1024*1024*1024} | ||||||
|                 suffix = mem_limit[-1].lower() |                 suffix = mem_limit[-1].lower() | ||||||
|                  | 
 | ||||||
|                 if suffix in units.keys(): |                 if suffix in units.keys(): | ||||||
|                     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): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue