After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 607077 - pyatspi2: magic to detect whether to use corba version or not can be broken
pyatspi2: magic to detect whether to use corba version or not can be broken
Status: RESOLVED FIXED
Product: pyatspi2
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2010-01-15 14:16 UTC by Vincent Untz
Modified: 2019-03-27 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This should fix it (668 bytes, patch)
2010-01-15 14:42 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2010-01-15 14:16:18 UTC
When trying to build accerciser, I get this:

  • File "./pyreqs.py", line 31 in <module>
    m = __import__(name)
  • File "/usr/lib/python2.6/site-packages/pyatspi/__init__.py", line 22 in <module>
    del gconfClient
NameError: name 'gconfClient' is not defined

So it looks like the patch from bug #606251 is broken in some cases. And indeed, the "del gconfClient" will fail if "import gconf" fails.
Comment 1 Vincent Untz 2010-01-15 14:42:01 UTC
Created attachment 151476 [details] [review]
This should fix it
Comment 2 Willie Walker 2010-01-15 17:14:55 UTC
Comment on attachment 151476 [details] [review]
This should fix it

>+    gconf = None
>+    gconfClient = None

These add gconf and gconfClient to the namespace, so...

>-    del gconfClient
>-    del gconf
>+    if gconfClient:
>+        del gconfClient
>+    if gconf:
>+        del gconf

We just need the original del's here because they are already in the namespace.
Comment 3 Willie Walker 2010-01-15 17:16:32 UTC
So, I committed a simpler form of the patch that just sets gconf and gconfClient to None (i.e., the first part of the original patch).  Seems to work well for me.  I also committed a similar fix to the at-spi/pyatspi/__init__.py.in file for CORBA.
Comment 4 Willie Walker 2010-01-15 17:17:27 UTC
Comment on attachment 151476 [details] [review]
This should fix it

Committed just the portion that defines gconf and gconfClient.  Sorry for the problems and thanks for pointing this out.