Skip to content

Commit

Permalink
Be more specific about catching Exceptions
Browse files Browse the repository at this point in the history
Co-Authored-By: bridadan <[email protected]>
  • Loading branch information
theotherjimmy and bridadan authored Mar 4, 2019
1 parent 17fd383 commit 93a0a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def fetch_rev(url, rev):
# Download and write the data in 1 MB chunks
data = inurl.read(1024 * 1024)
outfd.write(data)
except:
except Exception:
if os.path.isfile(rev_file):
os.remove(rev_file)
raise Exception(128, "Download failed!\nPlease try again later.")
Expand Down

0 comments on commit 93a0a04

Please sign in to comment.