Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72dd7aab authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Fix regex escape warnings in cleanup script

parent 7333a383
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,9 +34,9 @@ def clean_path(path, builds_to_keep, current_version, old_builds_to_keep,
    for (dirpath, dirnames, filenames) in walk(scandir):
        files.extend([dirpath+"/"+f for f in filenames])

    files_re = compile(ROM_NAME + "-[\d,.]+-[\d]+-[\w]+-[\w]+[.,\w]+")
    files_re = compile(r"%s-[\d,.]+-[\d]+-[\w]+-[\w]+[.,\w]+" % ROM_NAME)
    build_files = [f for f in files if files_re.match(basename(f))]
    build_re = compile(ROM_NAME + "-[\d,.]+-[\d]+-[\w]+-[\w]+")
    build_re = compile(r"%s-[\d,.]+-[\d]+-[\w]+-[\w]+" % ROM_NAME)
    builds = {}

    # builds = {codename: {buildname: (date, [path, ...]), ...}, ...}