Xpra: Ticket #114: Can't "xpra stop" on CentOS 6

$ xpra stop :2
Traceback (most recent call last):
  File "/usr/bin/xpra", line 6, in <module>
    xpra.scripts.main.main(__file__, sys.argv)
  File "/usr/lib/python2.6/site-packages/xpra/scripts/main.py", line 268, in main
    run_stop(parser, options, args)
  File "/usr/lib/python2.6/site-packages/xpra/scripts/main.py", line 460, in run_stop
    e = app.run()
  File "/usr/lib/python2.6/site-packages/xpra/client_base.py", line 199, in run
    glib.threads_init()
AttributeError: 'module' object has no attribute 'threads_init'


Mon, 23 Apr 2012 17:37:51 GMT - Antoine Martin: owner, priority, status changed

Does this workaround the problem:

### Eclipse Workspace Patch 1.0
#P Xpra
Index: src/xpra/client_base.py
===================================================================
--- src/xpra/client_base.py	(revision 751)
+++ src/xpra/client_base.py	(working copy)
@@ -196,8 +196,16 @@
     def run(self):
         import glib
-        glib.threads_init()
-        gobject.threads_init()
+        try:
+            glib.threads_init()
+        except AttributeError:
+            #old versions of glib may not have this method
+            pass
+        try:
+            gobject.threads_init()
+        except AttributeError:
+            #old versions of gobject may not have this method
+            pass
         self.glib_mainloop = glib.MainLoop()
         self.glib_mainloop.run()
         return  self.exit_code

Mon, 23 Apr 2012 19:33:51 GMT - ahuillet:

Works.


Mon, 23 Apr 2012 19:36:55 GMT - Antoine Martin: status changed; resolution set

applied in r763


Sat, 23 Jan 2021 04:45:55 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/114