Fix pylint issue E0606: possibly-used-before-assignment

Fix:
assemblers/org.osbuild.qemu:310:36: E0606: Possibly using variable 'prep_type' before assignment (possibly-used-before-assignment)
inputs/org.osbuild.tree:85:15: E0606: Possibly using variable 'path' before assignment (possibly-used-before-assignment)
stages/org.osbuild.sfdisk:58:36: E0606: Possibly using variable 'prep_type' before assignment (possibly-used-before-assignment)
stages/org.osbuild.systemd.unit:23:16: E0606: Possibly using variable 'unit_dropins_dir' before assignment (possibly-used-before-assignment)
test/mod/test_meta.py:219:29: E0606: Possibly using variable 'schema_part' before assignment (possibly-used-before-assignment)

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-11-19 13:36:20 +01:00 committed by Michael Vogt
parent 7f86ccc7fc
commit 3ac6d405b5
5 changed files with 10 additions and 0 deletions

View file

@ -305,6 +305,8 @@ class PartitionTable:
prep_type = "41"
elif self.label == "gpt":
prep_type = "9E1A2D38-C612-4316-AA26-8B49521E5A8B"
else:
raise RuntimeError(f"Unknown partition table type: {self.label}")
for part in self.partitions:
if part.type.upper() == prep_type: