Skip to content

Commit 718da28

Browse files
committed
glusterfs/ghetto-purge.py: minor fix
Process the current path as long as it exists and it's not a direc- tory. We don't actually need to confirm if it's a "file" here, as it could be a socket or some other type of file (and we are already skipping symlinks in the main loop).
1 parent 44c70ab commit 718da28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glusterfs/ghetto-purge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main():
5858

5959
process_directory(brick_path, path_to_analyze)
6060

61-
elif Path(f"{path_to_analyze}").is_file():
61+
else:
6262
process_file(brick_path, path_to_analyze)
6363
else:
6464
if args.debug:
@@ -88,7 +88,7 @@ def descend_into_directory(brick_path, path):
8888
# over entries named in the input file.
8989
process_directory(brick_path, entry.path)
9090

91-
elif entry.is_file():
91+
else:
9292
process_file(brick_path, entry.path)
9393

9494

0 commit comments

Comments
 (0)