repo.or.cz
/
nil.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
I have no idea what I changed there
[nil.git]
/
nil
/
http.py
blob
bd6b0d31ff7c6266982078c73d3ad12772b0fdec
1
import
urllib2
2
3
def
download
(
url
):
4
request
=
urllib2
.
Request
(
url
)
5
response
=
urllib2
.
urlopen
(
request
)
6
data
=
response
.
read
()
7
return
data
8
9
try
:
10
request
=
urllib2
.
Request
(
url
)
11
response
=
urllib2
.
urlopen
(
request
)
12
data
=
response
.
read
()
13
return
data
14
except
:
15
return None