Skip to content

Commit

Permalink
misc fixes:
Browse files Browse the repository at this point in the history
* GTK3 compat imports for gobject
* win32 chokes on unicode..

git-svn-id: https://xpra.org/svn/Xpra/trunk@8826 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 23, 2015
1 parent 204ec9a commit 9f362c3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/xpra/child_reaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@

import os, sys
import signal
import gobject

from xpra.gtk_common.gobject_compat import import_gobject
gobject = import_gobject()
gobject.threads_init()

from xpra.log import Logger
log = Logger("server", "util")
Expand Down
3 changes: 2 additions & 1 deletion src/xpra/net/subprocess_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import subprocess
import binascii

import gobject
from xpra.gtk_common.gobject_compat import import_gobject
gobject = import_gobject()
gobject.threads_init()

from xpra.net.bytestreams import TwoFileConnection
Expand Down
12 changes: 8 additions & 4 deletions src/xpra/sound/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import os
import time

import gobject
gobject.threads_init()

from xpra.net.subprocess_wrapper import subprocess_caller, subprocess_callee
from xpra.net.subprocess_wrapper import subprocess_caller, subprocess_callee, gobject
from xpra.platform.paths import get_sound_executable
from xpra.util import AdHocStruct
from xpra.log import Logger
Expand Down Expand Up @@ -156,6 +153,13 @@ def exec_kwargs(self):
env = os.environ.copy()
env["XPRA_SKIP_UI"] = "1"
kwargs["env"] = env
#let's make things more complicated than they should be:
#on win32, the environment can end up containing unicode, and subprocess chokes on it
for k,v in env.items():
try:
env[k] = v.encode("utf8")
except:
env[k] = str(v)
return kwargs


Expand Down

0 comments on commit 9f362c3

Please sign in to comment.