4
4
import os
5
5
import subprocess
6
6
import tempfile
7
- from typing import Dict , List , Literal , Optional , overload , Union
7
+ from typing import Dict , List , Literal , Optional , overload , TYPE_CHECKING , Union
8
8
9
9
import lib .commands as commands
10
10
import lib .efi as efi
14
14
from lib .snapshot import Snapshot
15
15
from lib .vif import VIF
16
16
17
+ if TYPE_CHECKING :
18
+ from lib .host import Host
19
+
17
20
class VM (BaseVM ):
18
- def __init__ (self , uuid , host ):
21
+ def __init__ (self , uuid : str , host : 'Host' ):
19
22
super ().__init__ (uuid , host )
20
23
self .ip : Optional [str ] = None
21
24
self .previous_host = None # previous host when migrated or being migrated
@@ -471,7 +474,7 @@ def clear_uefi_variables(self):
471
474
"""
472
475
self .param_remove ('NVRAM' , 'EFI-variables' )
473
476
474
- def get_all_efi_bins (self ):
477
+ def get_all_efi_bins (self ) -> List [ str ] :
475
478
magicsz = str (len (efi .EFI_HEADER_MAGIC ))
476
479
files = self .ssh (
477
480
[
@@ -482,7 +485,7 @@ def get_all_efi_bins(self):
482
485
decode = False ).split (b'\n ' )
483
486
484
487
magic = efi .EFI_HEADER_MAGIC .encode ('ascii' )
485
- binaries : list [str ] = []
488
+ binaries : List [str ] = []
486
489
for f in files :
487
490
if magic in f :
488
491
# Avoid decoding an unsplit f, as some headers are not utf8
0 commit comments