Skip to content

Commit

Permalink
Better to check the return code of the file indeed there than otherwi…
Browse files Browse the repository at this point in the history
…se (#4100)
  • Loading branch information
lasote authored Dec 11, 2018
1 parent 21760cd commit 0744a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conans/client/rest/uploader_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def upload(self, url, abs_path, auth=None, dedup=False, retry=1, retry_wait=0, h
dedup_headers.update(headers)
response = self.requester.put(url, data="", verify=self.verify, headers=dedup_headers,
auth=auth)
if response.status_code != 404:
if response.status_code == 201: # Artifactory returns 201 if the file is there
return response

headers = headers or {}
Expand Down

0 comments on commit 0744a08

Please sign in to comment.