From 1f045c26587ae206995da012c89d3947d26d3cac Mon Sep 17 00:00:00 2001 From: William Ting Date: Tue, 28 Jan 2014 23:18:31 -0600 Subject: [PATCH] trigger OSError for missing current directory --- bin/autojump | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index 079ba90..2479a8d 100755 --- a/bin/autojump +++ b/bin/autojump @@ -163,10 +163,11 @@ def detect_smartcase(needles): def find_matches(entries, needles): """Return an iterator to matching entries.""" try: + os.getcwdu() not_cwd = lambda entry: entry.path != os.getcwdu() except OSError: # tautology if current working directory no longer exists - not_cwd = lambda x: True + not_cwd = lambda _: True data = sorted( ifilter(not_cwd, entries),