Add more debugging and fix the platform detection for Linux

This commit is contained in:
Chris Jones 2008-05-22 19:54:48 +01:00
parent 5927ddc51a
commit 9c55078319
1 changed files with 6 additions and 1 deletions

View File

@ -50,10 +50,15 @@ if platform.system() == 'FreeBSD':
try:
from terminatorlib import freebsd
pid_get_cwd = lambda pid: freebsd.get_process_cwd(pid)
dbg ('Using FreeBSD pid_get_cwd')
except:
dbg ('FreeBSD version too old for pid_get_cwd')
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)
else:
dbg ('Unable to set a pid_get_cwd, unknown system: %s'%platform.system)
# import gtk libs
# check just in case anyone runs it on a non-gnome system.