@@ -111,8 +111,8 @@ def __lt__(self, other: object) -> bool:
111111 if self ._vm and other ._vm :
112112 assert self ._vm_name is not None and other ._vm_name is not None
113113 return (self ._vm , self ._vm_name ) < (other ._vm , other ._vm_name )
114- if self ._vid and other ._vid :
115- assert self ._pool is not None and other ._pool is not None
114+ if self ._pool and other ._pool :
115+ assert self ._vid is not None and other ._vid is not None
116116 return (self ._pool , self ._vid ) < (other ._pool , other ._vid )
117117 return NotImplemented
118118
@@ -279,8 +279,6 @@ def revert(self, revision: str) -> None:
279279
280280 :param str revision: Revision identifier to revert to
281281 """
282- if not isinstance (revision , str ):
283- raise TypeError ('revision must be a str' )
284282 self ._qubesd_call ('Revert' , revision .encode ('ascii' ))
285283
286284 def import_data (self , stream : BinaryIO ) -> None :
@@ -332,7 +330,7 @@ class Pool:
332330 """ A Pool is used to manage different kind of volumes (File
333331 based/LVM/Btrfs/...).
334332 """
335- def __init__ (self , app : QubesBase , name : str | None = None ):
333+ def __init__ (self , app : QubesBase , name : str ):
336334 """ Initialize storage pool wrapper
337335
338336 :param app: Qubes() object
@@ -343,7 +341,6 @@ def __init__(self, app: QubesBase, name: str | None=None):
343341 self ._config = None
344342
345343 def __str__ (self ) -> str :
346- assert self .name is not None
347344 return self .name
348345
349346 def __eq__ (self , other : object ) -> bool :
0 commit comments