This commit is contained in:
Reid 'arrdem' McKenzie 2022-08-12 23:26:56 -06:00
parent b1a309527a
commit 9feae8df4c

View file

@ -19,13 +19,13 @@ Inspired by https://github.com/herval/org_photos/blob/main/org_photos.rb
import argparse
from datetime import datetime, timedelta
from hashlib import sha256, sha512
import os
from pathlib import Path
import re
from shutil import copy2 as copyfile
import stat
import sys
import typing as t
import os
from .util import *
@ -351,7 +351,7 @@ def img_info(p: Path) -> ImgInfo:
def is_readonly(src: Path) -> bool:
statinfo = os.stat(src, dir_fd=None, follow_symlinks=True)
if getattr(statinfo, 'st_flags', 0) & stat.UF_IMMUTABLE:
if getattr(statinfo, "st_flags", 0) & stat.UF_IMMUTABLE:
return True
return False