redhat-qe-security / SCAutolib

Library for automation of smart card testing
GNU General Public License v3.0
3 stars 10 forks source link

Reduce number of subprocess calls #39

Closed x00Pavel closed 2 years ago

x00Pavel commented 2 years ago

Calling subprocess for any bash command is mostly inefficient when there is pythonic way/module to do same operation. That would be good from performance point of view to reduce number of subprocess calls. For example, for operation with packages there is rpm python module that can be used for quivering over RPM database, installing/upgrading packages; restarting systemd services can be done by direct signal to bus from dbus python module

x00Pavel commented 2 years ago

Communication with RPM db and dbus of the system is not worth implementing, calling corresponding commands from the subprocess seems to be a more easy way. But what can be reduced, is communicating with IPA server via its Python API

x00Pavel commented 2 years ago

Resolving in new version