clan: remove flatpak check

This check logs, if the cli is started inside a flatpak environment.
This commit is contained in:
a-kenji
2024-07-30 14:21:15 +02:00
parent 2d4cd0c9be
commit acb5560de8
2 changed files with 0 additions and 19 deletions

View File

@@ -18,7 +18,6 @@ from . import (
config, config,
facts, facts,
flash, flash,
flatpak,
history, history,
machines, machines,
secrets, secrets,
@@ -408,8 +407,6 @@ def main() -> None:
if getattr(args, "debug", False): if getattr(args, "debug", False):
setup_logging(logging.DEBUG, root_log_name=__name__.split(".")[0]) setup_logging(logging.DEBUG, root_log_name=__name__.split(".")[0])
log.debug("Debug log activated") log.debug("Debug log activated")
if flatpak.is_flatpak():
log.debug("Running inside a flatpak sandbox")
else: else:
setup_logging(logging.INFO, root_log_name=__name__.split(".")[0]) setup_logging(logging.INFO, root_log_name=__name__.split(".")[0])

View File

@@ -1,16 +0,0 @@
import os
def is_flatpak() -> bool:
"""Check if the current process is running inside a flatpak sandbox."""
# FLATPAK_ID environment variable check
flatpak_env = "FLATPAK_ID" in os.environ
flatpak_file = False
try:
with open("/.flatpak-info"):
flatpak_file = True
except FileNotFoundError:
pass
return flatpak_env and flatpak_file