INNER CODE UNIT · Python

die

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

def die(msg):
    print(f"Error: {msg}", file=sys.stderr)
    sys.exit(1)

def git(*args, check=True, stdin=None):
    result = subprocess.run(["git"] + list(args),
                            input=stdin, capture_output=True, text=True)
    if check and (result.returncode != 0):
        die(f"git {' '.join(args)}\n{result.stderr.strip()}")
    return result

def locale_path(locale):
    return f"{STRINGS_BASE}/values-{locale}/strings.xml"

# ---------------------------------------------------------------------------
# Status file: one "locale=commit_hash" per line
# ---------------------------------------------------------------------------

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…