Skip to content

Commit

Permalink
Fix support for ftp protocol when fetching metadata
Browse files Browse the repository at this point in the history
When using FTP urlopen raises URLError, not HTTPError.
URLError works with all protocols.
  • Loading branch information
velezd authored and lubomir committed Feb 28, 2023
1 parent 0921afd commit a9d339e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion productmd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _file_exists(path):
try:
file_obj = _urlopen(path)
file_obj.close()
except six.moves.urllib.error.HTTPError:
except six.moves.urllib.error.URLError:
return False
return True
return os.path.exists(path)
Expand Down

0 comments on commit a9d339e

Please sign in to comment.