From 649c3db7672549bf0918fd60f11cbce23c0cbb09 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Sat, 2 Nov 2024 17:56:47 +0100 Subject: [PATCH] ubuntu-build: fix used-before-assignment ``` ubuntu-build:244:40: E0601: Using variable 'necessary_privs' before assignment (used-before-assignment) ``` --- ubuntu-build | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ubuntu-build b/ubuntu-build index df4bf86..1ed8161 100755 --- a/ubuntu-build +++ b/ubuntu-build @@ -240,15 +240,14 @@ def main(): pocket=pocket, sourcepackagename=sources.getPackageName(), ) - - if operation == "retry" and not necessary_privs: - Logger.error( - "You cannot perform the %s operation on a %s package as you" - " do not have the permissions to do this action.", - operation, - component, - ) - sys.exit(1) + if not necessary_privs: + Logger.error( + "You cannot perform the %s operation on a %s package as you" + " do not have the permissions to do this action.", + operation, + component, + ) + sys.exit(1) # Output details. Logger.info(