From 8d8af5e60af2bdd605a14692ebbf99c00f069214 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 9 May 2026 12:51:28 +0200 Subject: [PATCH] Improved git command timeout logging --- RNS/Utilities/rngit/pages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rngit/pages.py b/RNS/Utilities/rngit/pages.py index 0de66199..3a1810e6 100644 --- a/RNS/Utilities/rngit/pages.py +++ b/RNS/Utilities/rngit/pages.py @@ -67,7 +67,7 @@ class NomadNetworkNode(): TREE_ENTRIES_PER_PAGE = 1000 COMMITS_PER_PAGE = 100 SHOW_DIFF_BY_DEFAULT = True - GIT_COMMAND_TIMEOUT = 5 + GIT_COMMAND_TIMEOUT = 8 MAX_RENDER_WIDTH = 100 USE_NERDFONTS = True @@ -863,6 +863,7 @@ class NomadNetworkNode(): content = self.m_heading("Error", 2) + f"\nThe hash {commit_hash} does not refer to a commit.\n" return self.render_template(content, st=st) + except subprocess.TimeoutExpired: RNS.log(f"Git command execution timed out", RNS.LOG_WARNING) except Exception: content = self.m_heading("Error", 2) + "\nCould not verify commit object.\n" return self.render_template(content, st=st) @@ -995,6 +996,7 @@ class NomadNetworkNode(): if head_result.returncode == 0: default_branch = head_result.stdout.strip().replace("refs/heads/", "") + except subprocess.TimeoutExpired: RNS.log(f"Git command execution timed out", RNS.LOG_WARNING) except Exception: pass show_heads = not ref_type or ref_type == "heads"