fix saveUrl

This commit is contained in:
j 2009-07-13 12:30:37 +02:00
parent 6fc6850b09
commit 7a531dc8ef

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4 # vi:si:et:sw=4:sts=4:ts=4
# GPL 2008 # GPL 2008
import os
import gzip import gzip
import StringIO import StringIO
import urllib import urllib
@ -61,7 +62,7 @@ def saveUrl(url, filename, overwrite=False):
dirname = os.path.dirname(filename) dirname = os.path.dirname(filename)
if not os.path.exists(dirname): if not os.path.exists(dirname):
os.makedirs(dirname) os.makedirs(dirname)
data = oxlib.net.getUrl(url) data = getUrl(url)
f = open(filename, 'w') f = open(filename, 'w')
f.write(data) f.write(data)
f.close() f.close()