[snip]
+ # openSUSE doesn't seem to have a convenient way to remove all
+ # unnecessary packages, but CentOS and Fedora do
+ if os_name == "OpenSUSE":
+ commands.extend([
+ "{package_manager} clean --all",
+ ])
+ else:
+ commands.extend([
+ "{package_manager} autoremove -y",
+ "{package_manager} clean all -y",
+ ])
+
IMHO, it'd be easier to follow / cleaner if we do:
if os_name != "OpenSUSE:"
commands.extend([
"{package_manager} autoremove -y",
])
And then, later on ...
commands.extend([
"{package_manager} clean all -y",
])
[snip]
Best Regards,
--
Fabiano FidĂȘncio