INNER CODE UNIT · Python

load_status

emanuele-f/PCAPdroid · tools/weblate.py:42

def load_status():
    status = {}
    if os.path.exists(STATUS_FILE):
        with open(STATUS_FILE) as f:
            for line in f:
                line = line.strip()
                if (not line) or line.startswith("#"):
                    continue
                locale, commit = line.split("=", 1)
                status[locale] = commit
    return status

def save_status(status):
    with open(STATUS_FILE, "w") as f:
        for locale in sorted(status):
            f.write(f"{locale}={status[locale]}\n")

# ---------------------------------------------------------------------------

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…