[Yum-devel] urlgrab, open, read and temporary files

andrea mariofutire at googlemail.com
Tue Jan 22 20:30:26 UTC 2013


Hi,

I would like to understand exactly if and where urlgrabber might write to temporary files.

In a recent post here I was told that urlopen() saves the link to a file before returning it

http://article.gmane.org/gmane.linux.rpm.yum.devel/6661

Reading grabber.py I can only find something like that

1729            self.fo = StringIO()
1721             # if this is to be a tempfile instead....
1722             # it just makes crap in the tempdir
1723             #fh, self._temp_name = mkstemp()
1724             #self.fo = open(self._temp_name, 'wb')

where it seems that something like that might have gone on at some time (not sure it is relevant thouh).

urlgrab clearly writes to a file.
But urlopen and urlread, do they write? and if yes, where?

I ask that since I am going to use it on a Raspberry PI and I don't want to have a long running
script that continually writes to the SD card.
I could use urlgrab to /tmp, but I find more elegant to use urlopen or urlread if they don't write
to the "wrong" place.

Thanks



More information about the Yum-devel mailing list