MCPcopy
hub / github.com/freedomofpress/dangerzone / get_version

Function get_version

dangerzone/util.py:98–107  ·  view source on GitHub ↗

Returns the Dangerzone version string.

()

Source from the content-addressed store, hash-verified

96
97
98def get_version() -> str:
99 """Returns the Dangerzone version string."""
100 try:
101 with get_resource_path("version.txt").open() as f:
102 version = f.read().strip()
103 except FileNotFoundError:
104 # In dev mode, in Windows, get_resource_path doesn't work properly for the container, but luckily
105 # it doesn't need to know the version
106 version = "unknown"
107 return version
108
109
110def replace_control_chars(untrusted_str: str, keep_newlines: bool = False) -> str:

Calls 1

get_resource_pathFunction · 0.85