GNOME Bugzilla – Bug 346328
gnomevfs.get_file_info behaves strangely in python plugins
Last modified: 2009-03-09 04:52:32 UTC
In python plugins, gnomevfs.get_file_info returns a FileInfo object without an mtime field (for http files). When the mtime field is accessed, python throws the following exception: >>> info.mtime Traceback (most recent call last):
+ Trace 69143
r = eval(command, self.namespace, self.namespace)
Note the reference to "ntime", as opposed to "mtime" in the exception message. For a full description of the bug, see comments 9-24 of bug 345783. I can't reproduce it myself, however by comparing results of certain actions in the python interpreter, Florian Zeitz and I have been able to narrow down some of the conditions that cause it to appear on Florian's machine: - it only appears when running the python code under rhythmbox (i.e. running python from the command line will not produce the bug, but running the same commands in the rhythmbox python console will) - mtime(ntime?) and atime are the only fields that are affected as far as I am aware The only difference in configurations that I've noticed is that Florian has rhythmbox installed in his home directory, while I have it packaged and installed in /usr. I don't see the bug, and he does.
mtime isn't guaranteed to be valid, as the http server may not send information about it, and any code should be prepared to handle that. I don't think this is really a bug. The difference in behaviour may be due to things like proxies or other settings.
I just noticed the 'ntime' thing while I was messing around with another plugin. Turns out it's just a typo. See bug 465404.
gnome-vfs -> obsolete