Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage-download-file: python3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ohanar committed Dec 18, 2013
1 parent 19c1f86 commit 8be0a29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bin/sage-download-file
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ exec $URL_GRABBER <<EOF
# Python script to download a file to stdout #
##############################################
import sys, urllib
import sys
try:
# Python 3
import urllib.request as urllib
except ImportError:
import urllib
# Change the URLopener to raise an exception on HTTP errors
def http_error_default(url, fp, errcode, errmsg, headers):
Expand Down

0 comments on commit 8be0a29

Please sign in to comment.