diff options
author | Milan Svoboda <msvoboda@ra.rockwell.com> | 2014-11-23 15:21:58 +0100 |
---|---|---|
committer | Milan Svoboda <msvoboda@ra.rockwell.com> | 2014-11-23 15:21:58 +0100 |
commit | fd808da18aff05c8b7e1bd2c15a8cdfb1ee7ba28 (patch) | |
tree | 8395fa6ddaecdec312a55bd10b6e811733c351ec | |
parent | 9f7001379a88666ad07c7d04a5164ef802499481 (diff) | |
download | ranger-fd808da18aff05c8b7e1bd2c15a8cdfb1ee7ba28.tar.gz |
move self.flat branch out of try block
-rw-r--r-- | ranger/container/directory.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py index f0cb4067..2f1e5e11 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -279,17 +279,17 @@ class Directory(FileSystemObject, Accumulator, Loadable): stats = None is_a_dir = False if is_a_dir: - try: - if self.flat: - item = Directory(name, preload=stats, path_is_abs=True, - basename_is_rel_to=basename_is_rel_to) - item.load() - else: + if self.flat: + item = Directory(name, preload=stats, path_is_abs=True, + basename_is_rel_to=basename_is_rel_to) + item.load() + else: + try: item = self.fm.get_directory(name) item.load_if_outdated() - except: - item = Directory(name, preload=stats, path_is_abs=True) - item.load() + except: + item = Directory(name, preload=stats, path_is_abs=True) + item.load() else: item = File(name, preload=stats, path_is_abs=True, basename_is_rel_to=basename_is_rel_to) |