From 122602a2a8d96ded573c377db5a94fd18b298143 Mon Sep 17 00:00:00 2001 From: Ondřej Nosek Date: May 13 2025 01:10:58 +0000 Subject: `srpm`: --offline arg to prevent connecting to Koji Uses newly added rpkg flag to terminate the action. For some branches, offline mode is not possible because there are required macros in Koji. JIRA: RHELCMP-14513 Fixes: #600 Signed-off-by: Ondřej Nosek --- diff --git a/fedpkg/__init__.py b/fedpkg/__init__.py index 7683f45..ce21c90 100644 --- a/fedpkg/__init__.py +++ b/fedpkg/__init__.py @@ -217,6 +217,10 @@ class Commands(pyrpkg.Commands): if self._kojisession: session = self.kojisession else: + if self.koji_offline: + # can't continue, the process relies on macros from Koji + raise pyrpkg.rpkgError( + 'Offline is active - can\'t get macros for the current release from Koji.') session = self.anon_kojisession try: