Skip to content

Commit

Permalink
added check and remove empty folders
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideTisi committed May 5, 2024
1 parent aadb5fd commit c8c794a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,8 @@ def clean(session):
tracked_files_output = get_example_other_files()
for ifile in tracked_files_output:
os.remove(ifile)
flist = glob.glob("example/*")
# check for empty list and remove them
for fl in flist:
if 0 == len(glob.glob(fl)):
os.rmdir(fl)

0 comments on commit c8c794a

Please sign in to comment.