File tree Expand file tree Collapse file tree
modules/packages/vendored Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,10 +307,12 @@ def _resolve_spec(pkg: Dict[str, str]) -> Optional[str]:
307307 if not name :
308308 return None
309309 spec = name
310- if pkg .get ("version" ):
311- spec += "-" + pkg .get ("version" )
312- if pkg .get ("arch" ):
313- spec += "." + pkg .get ("arch" )
310+ version = pkg .get ("version" )
311+ if version :
312+ spec += "-" + version
313+ arch = pkg .get ("arch" )
314+ if arch :
315+ spec += "." + arch
314316 return spec
315317
316318
@@ -377,9 +379,9 @@ def list_updates(online: bool) -> int:
377379 _apply_options (base , options )
378380 try :
379381 base .upgrade_all ()
380- if base .resolve ():
382+ if base .resolve () and base . transaction :
381383 for tsi in base .transaction :
382- if tsi .action == dnf .transaction .PKG_UPGRADE :
384+ if tsi .action == dnf .transaction .PKG_UPGRADE : # type: ignore[attr-defined]
383385 v_str = f"{ tsi .pkg .version } -{ tsi .pkg .release } "
384386 sys .stdout .write (
385387 f"{ KEY_NAME } ={ tsi .pkg .name } \n { KEY_VERSION } ={ v_str } \n { KEY_ARCHITECTURE } ={ tsi .pkg .arch } \n "
You can’t perform that action at this time.
0 commit comments