projects
/
winfreed.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a0ec06
)
winfreed.py: fix "W293 blank line contains whitespace" from pep8
author
Antonio Ospite <ospite@studenti.unina.it>
Sat, 26 Nov 2011 12:08:44 +0000
(13:08 +0100)
committer
Antonio Ospite <ospite@studenti.unina.it>
Sat, 26 Nov 2011 12:10:39 +0000
(13:10 +0100)
winfreed.py
patch
|
blob
|
history
diff --git
a/winfreed.py
b/winfreed.py
index
a1639c3
..
13b7580
100755
(executable)
--- a/
winfreed.py
+++ b/
winfreed.py
@@
-79,7
+79,7
@@
def download(pkg):
# re pattern from http://stackoverflow.com/questions/8035900
content_disposition = response.info().getheader('Content-Disposition').strip()
filename = re.findall("filename=(\S+)", content_disposition)[0]
# re pattern from http://stackoverflow.com/questions/8035900
content_disposition = response.info().getheader('Content-Disposition').strip()
filename = re.findall("filename=(\S+)", content_disposition)[0]
-
+
if filename == "":
filename = urllib2.unquote(os.path.basename(response.geturl()))
if filename == "":
filename = urllib2.unquote(os.path.basename(response.geturl()))
@@
-145,5
+145,5
@@
if __name__ == "__main__":
else:
usage()
sys.exit(1)
else:
usage()
sys.exit(1)
-
+
sys.exit(0)
sys.exit(0)