Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen committed Nov 2, 2024
1 parent 8267703 commit 4c261b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions PFERD/output_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,13 @@ def _update_metadata(self, info: DownloadInfo) -> None:
if hasattr(os, "chflags"):
print("Has chflags")
import stat
stat_result = os.stat(info.local_path)
stat_result = None
with open(info.local_path, "r") as f:
os.fsync(f)
stat_result = os.fstat(f.fileno())
print("Stat result", stat_result)
# Not present on all unixes
if hasattr(stat_result, "st_flags"):
if stat_result is not None and hasattr(stat_result, "st_flags"):
print("Has flags")
flags = getattr(stat_result, "st_flags")
print("Flags are ", flags)
Expand Down

0 comments on commit 4c261b5

Please sign in to comment.