mirror of https://github.com/docker/docker-py.git
				
				
				
			Add raise_for_status check to push and pull methods
as underlying exceptions(such as push already in progress) will be hidden in the stream generator otherwise.
This commit is contained in:
		
							parent
							
								
									5fa7576e8c
								
							
						
					
					
						commit
						badc5b69ad
					
				|  | @ -914,6 +914,8 @@ class Client(requests.Session): | |||
|         response = self._post(self._url('/images/create'), params=params, | ||||
|                               headers=headers, stream=stream, timeout=None) | ||||
| 
 | ||||
|         self._raise_for_status(response) | ||||
| 
 | ||||
|         if stream: | ||||
|             return self._stream_helper(response) | ||||
|         else: | ||||
|  | @ -950,6 +952,8 @@ class Client(requests.Session): | |||
|         else: | ||||
|             response = self._post_json(u, None, stream=stream, params=params) | ||||
| 
 | ||||
|         self._raise_for_status(response) | ||||
| 
 | ||||
|         return stream and self._stream_helper(response) \ | ||||
|             or self._result(response) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue