Sfoglia il codice sorgente

qvm-template: Remove default 'repo_files' entry if other entries have been specified by the user.

WillyPillow 3 anni fa
parent
commit
42a741cac5
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      qubesadmin/tools/qvm_template.py

+ 5 - 0
qubesadmin/tools/qvm_template.py

@@ -1198,6 +1198,11 @@ def main(args: typing.Optional[typing.Sequence[str]] = None,
         # on inputs where the first argument is an option, like 'qvm-template
         # remove --help'. The bug should be fixed in Python 3.9.
 
+    # If the user specified other repo files...
+    if len(p_args.repo_files) > 1:
+        # ...remove the default entry
+        p_args.repo_files.pop(0)
+
     if app is None:
         app = qubesadmin.Qubes()