Changeset bb633e2 in rtems-central for rtemsspec/items.py


Ignore:
Timestamp:
07/28/22 09:53:19 (17 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
91234d7
Parents:
2c46d2d
git-author:
Sebastian Huber <sebastian.huber@…> (07/28/22 09:53:19)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/28/22 09:54:50)
Message:

items: Simplify code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsspec/items.py

    r2c46d2d rbb633e2  
    743743                if not update_cache:
    744744                    update_cache = mtime <= os.path.getmtime(path2)
    745             else:
    746                 if stat.S_ISDIR(os.lstat(path2).st_mode):
    747                     self._load_items_recursive(index, base, path2, cache_dir)
     745            elif stat.S_ISDIR(os.lstat(path2).st_mode):
     746                self._load_items_recursive(index, base, path2, cache_dir)
    748747        self._load_items_in_dir(base, path, cache_file, update_cache)
    749748
     
    812811                uid = "/" + os.path.relpath(path2, base).replace(".json", "")
    813812                self._add_item(uid, _load_json_data(path2, uid))
    814             else:
    815                 if stat.S_ISDIR(os.lstat(path2).st_mode):
    816                     self._load_json_items(base, path2)
     813            elif stat.S_ISDIR(os.lstat(path2).st_mode):
     814                self._load_json_items(base, path2)
    817815
    818816    def _load_items(self, config: Any):
Note: See TracChangeset for help on using the changeset viewer.