Skip to content

Commit

Permalink
remove parent
Browse files Browse the repository at this point in the history
  • Loading branch information
davedavemckay committed Feb 4, 2025
1 parent 97c7c93 commit 8cafd61
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/process_collated_zips.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def get_random_parquet_path():
return f'/tmp/{randint(0,1e6):06d}/data.parquet'

def rm_parquet(path):
if os.path.isdir(path) and not os.path.islink(path):
shutil.rmtree(path)
elif os.path.exists(path):
os.remove(path)
parent = os.path.dirname(path)
if os.path.isdir(parent) and not os.path.islink(parent):
shutil.rmtree(parent)
elif os.path.exists(parent):
os.remove(parent)

def find_metadata_swift(key: str, conn, bucket_name: str) -> List[str]:
"""
Expand Down

0 comments on commit 8cafd61

Please sign in to comment.