From 83d3b48287d57d4f65ba21c603ebffbe723f1fc3 Mon Sep 17 00:00:00 2001 From: stepshal Date: Sun, 19 Jun 2016 10:55:10 +0700 Subject: Comparison to True/False should be 'if cond is True/False:' or 'if not cond:'. --- ranger/core/actions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 642eec04..6e89d997 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -149,7 +149,7 @@ class Actions(FileManagerAware, SettingsAware): if ranger.arg.debug: raise bad = True - elif bad == True and ranger.arg.debug: + elif bad is True and ranger.arg.debug: raise Exception(str(text)) text = str(text) self.log.appendleft(text) @@ -515,7 +515,7 @@ class Actions(FileManagerAware, SettingsAware): # csh variable is lowercase cdpath = os.environ.get('CDPATH', None) or os.environ.get('cdpath', None) result = self.thistab.enter_dir(path, history=history) - if result == False and cdpath: + if result is False and cdpath: for p in cdpath.split(':'): curpath = os.path.join(p, path) if os.path.isdir(curpath): @@ -932,7 +932,7 @@ class Actions(FileManagerAware, SettingsAware): found = data.get((-1, -1), data.get((width, -1), data.get((-1, height), data.get((width, height), False)))) - if found == False: + if found is False: try: stat_ = os.stat(self.settings.preview_script) except: -- cgit 1.4.1-2-gfad0