Add more debugging and fix the platform detection for Linux
This commit is contained in:
parent
5927ddc51a
commit
9c55078319
|
@ -50,10 +50,15 @@ if platform.system() == 'FreeBSD':
|
||||||
try:
|
try:
|
||||||
from terminatorlib import freebsd
|
from terminatorlib import freebsd
|
||||||
pid_get_cwd = lambda pid: freebsd.get_process_cwd(pid)
|
pid_get_cwd = lambda pid: freebsd.get_process_cwd(pid)
|
||||||
|
dbg ('Using FreeBSD pid_get_cwd')
|
||||||
except:
|
except:
|
||||||
|
dbg ('FreeBSD version too old for pid_get_cwd')
|
||||||
pass
|
pass
|
||||||
elif platform.system == 'Linux':
|
elif platform.system() == 'Linux':
|
||||||
|
dbg ('Using Linux pid_get_cwd')
|
||||||
pid_get_cwd = lambda pid: os.path.realpath ('/proc/%s/cwd' % pid)
|
pid_get_cwd = lambda pid: os.path.realpath ('/proc/%s/cwd' % pid)
|
||||||
|
else:
|
||||||
|
dbg ('Unable to set a pid_get_cwd, unknown system: %s'%platform.system)
|
||||||
|
|
||||||
# import gtk libs
|
# import gtk libs
|
||||||
# check just in case anyone runs it on a non-gnome system.
|
# check just in case anyone runs it on a non-gnome system.
|
||||||
|
|
Loading…
Reference in New Issue