ubuntu-build: fix used-before-assignment

```
ubuntu-build:244:40: E0601: Using variable 'necessary_privs' before assignment (used-before-assignment)
```
This commit is contained in:
Benjamin Drung 2024-11-02 17:56:47 +01:00
parent e7ba650414
commit 649c3db767

View File

@ -240,15 +240,14 @@ def main():
pocket=pocket, pocket=pocket,
sourcepackagename=sources.getPackageName(), sourcepackagename=sources.getPackageName(),
) )
if not necessary_privs:
if operation == "retry" and not necessary_privs: Logger.error(
Logger.error( "You cannot perform the %s operation on a %s package as you"
"You cannot perform the %s operation on a %s package as you" " do not have the permissions to do this action.",
" do not have the permissions to do this action.", operation,
operation, component,
component, )
) sys.exit(1)
sys.exit(1)
# Output details. # Output details.
Logger.info( Logger.info(