[pygtk] Upgrading to gnome-python-2.15.2 broke my App
Gustavo J. A. M. Carneiro
gjc at inescporto.pt
Tue Jun 13 17:59:40 WST 2006
On Seg, 2006-06-12 at 18:54 -0400, Mystilleef wrote:
> Hello,
>
> I just upgraded to gnome-python-2.15.2 and now my application that uses
> the gnomevfs module is totally broken. The problem is permissions. Earlier
> versions of the gnomevfs modules had many permission constants missing.
> So one had to derive the constants manually. Prior to gnome-python-2.15
> the following code would have printed "You have permission to read."
> Now, it prints "You don't have permission to read."
>
> PERM_ACCESS_READABLE = 1 << 16
> if fileinfo.permissions & PERM_ACCESS_READABLE:
> print "You have permission to read"
> else:
> print "You don't have permission to read"
>
> The resultant effect is that my application can't open or save any files
> even on the local file system. Is this a bug? Is anyone else experiencing
> this problem? This problem started only after I upgraded to
> gnome-python-2.15.2.
Sorry. Since the constants were missing, I assumed the ability to use
them didn't exist.
From now on, when getting or setting the PERM_ACCESS_* flags you have
to use the new field fileinfo.access. This is a python-specific field
which I had to invent to overcome some limitations. For more
information see http://bugzilla.gnome.org/show_bug.cgi?id=338916
Regards,
--
Gustavo J. A. M. Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2289 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060613/4529b2b2/smime.bin
More information about the pygtk
mailing list