diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-06-02 20:12:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 20:12:24 +0000 |
commit | 9009e25cb1a7864127f6b2dc7329bd4178ad3a5d (patch) | |
tree | 1836ece8f108b7160e63e5a3cb952e95cb4734e0 /modules/ui_extra_networks.py | |
parent | 4cc0cede6d4cae74779b1b4cfc4b7bf7bfdaeaa6 (diff) | |
download | stable-diffusion-webui-gfx803-9009e25cb1a7864127f6b2dc7329bd4178ad3a5d.tar.gz stable-diffusion-webui-gfx803-9009e25cb1a7864127f6b2dc7329bd4178ad3a5d.tar.bz2 stable-diffusion-webui-gfx803-9009e25cb1a7864127f6b2dc7329bd4178ad3a5d.zip |
Apply suggestions from code review
Co-authored-by: Aarni Koskela <akx@iki.fi>
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 8142811a..a7d3bc79 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -210,10 +210,12 @@ class ExtraNetworksPage: """
List of default keys used for sorting in the UI.
"""
+ pth = Path(path)
+ stat = pth.stat()
return {
- "date_created": int(Path(path).stat().st_ctime or 0),
- "date_modified": int(Path(path).stat().st_mtime or 0),
- "name": Path(path).name.lower(),
+ "date_created": int(stat.st_ctime or 0),
+ "date_modified": int(stat.st_mtime or 0),
+ "name": pth.name.lower(),
}
def find_preview(self, path):
|