From 02cd8b5e6c4bfcf59c7a47faa1a2022386a6a0f5 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 22 Apr 2025 09:58:10 +0200 Subject: [PATCH] Fix 'osc fork' when in the source project is empty --- osc/commands/fork.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osc/commands/fork.py b/osc/commands/fork.py index 5823d00b..2992c9f3 100644 --- a/osc/commands/fork.py +++ b/osc/commands/fork.py @@ -84,6 +84,9 @@ class ForkCommand(osc.commandline.OscCommand): if e.code != 404: raise attributes = [] + except TypeError: + # empty element, unable to instantiate Attributes model + attributes = [] if attributes: attribute = attributes[0].value # the pattern starts with a non-greedy match so we capture the first url