Merge pull request #87 from terceiro/fix-get-cwd-fallback

Fix fallback for getting the current working directory
This commit is contained in:
Matt Rose 2020-05-16 15:23:28 -04:00 committed by GitHub
commit 41490f4ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ def get_default_cwd():
return(cwd)
def get_pid_cwd():
"""Determine an appropriate cwd function for the OS we are running on"""
"""Determine the cwd of the current process"""
return psutil.Process().as_dict()['cwd']
# vim: set expandtab ts=4 sw=4:

View File

@ -223,7 +223,7 @@ class Terminal(Gtk.VBox):
return(GLib.filename_from_uri(vte_cwd)[0])
else:
# Fall back to old gtk2 method
return(self.terminator.pid_cwd(self.pid))
return(self.terminator.pid_cwd())
def close(self):
"""Close ourselves"""

View File

@ -99,7 +99,7 @@ class Terminator(Borg):
if not self.doing_layout:
self.doing_layout = False
if not self.pid_cwd:
self.pid_cwd = get_pid_cwd()
self.pid_cwd = get_pid_cwd
if self.gnome_client is None:
self.attempt_gnome_client()
self.connect_signals()