mirror of
https://github.com/openSUSE/osc.git
synced 2024-09-21 01:36:16 +02:00
- yet another fix for python24
This commit is contained in:
parent
3226fb0f9b
commit
fbf2e669b4
29
osc/fetch.py
29
osc/fetch.py
@ -84,20 +84,21 @@ class Fetcher:
|
|||||||
|
|
||||||
(fd, tmpfile) = tempfile.mkstemp(prefix='osc_build')
|
(fd, tmpfile) = tempfile.mkstemp(prefix='osc_build')
|
||||||
try:
|
try:
|
||||||
# it returns the filename
|
try:
|
||||||
ret = mg.urlgrab(pac.filename,
|
# it returns the filename
|
||||||
filename = tmpfile,
|
ret = mg.urlgrab(pac.filename,
|
||||||
text = '%s(%s) %s' %(prefix, pac.project, pac.filename))
|
filename = tmpfile,
|
||||||
self.move_package(tmpfile, pac.localdir, pac)
|
text = '%s(%s) %s' %(prefix, pac.project, pac.filename))
|
||||||
except URLGrabError, e:
|
self.move_package(tmpfile, pac.localdir, pac)
|
||||||
if e.errno == 256:
|
except URLGrabError, e:
|
||||||
self.cpio.setdefault(pac.project, {})[pac.name] = pac
|
if e.errno == 256:
|
||||||
return
|
self.cpio.setdefault(pac.project, {})[pac.name] = pac
|
||||||
print
|
return
|
||||||
print >>sys.stderr, 'Error:', e.strerror
|
print
|
||||||
print >>sys.stderr, 'Failed to retrieve %s from the following locations (in order):' % pac.filename
|
print >>sys.stderr, 'Error:', e.strerror
|
||||||
print >>sys.stderr, '\n'.join(pac.urllist)
|
print >>sys.stderr, 'Failed to retrieve %s from the following locations (in order):' % pac.filename
|
||||||
sys.exit(1)
|
print >>sys.stderr, '\n'.join(pac.urllist)
|
||||||
|
sys.exit(1)
|
||||||
finally:
|
finally:
|
||||||
if os.path.exists(tmpfile):
|
if os.path.exists(tmpfile):
|
||||||
os.unlink(tmpfile)
|
os.unlink(tmpfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user