#1021 Raise error for non-200 codes in download_file
Merged 5 years ago by mikem. Opened 5 years ago by tkopecek.
tkopecek/koji issue1020  into  master

file modified
+2
@@ -498,6 +498,8 @@ 

  

  

      with closing(requests.get(url, stream=True)) as response:

+         # raise error if occured

+         response.raise_for_status()

          length = response.headers.get('content-length')

          f = open(relpath, 'wb')

          if length is None: