stdevel / katprep

Python toolkit for automating system maintenance and generating patch reports along with Foreman/Katello and Red Hat Satellite 6.x
GNU General Public License v3.0
35 stars 6 forks source link

Modules cannot be executed directly #97

Closed stdevel closed 6 years ago

stdevel commented 6 years ago

Currently, modules such as katprep.authconfig cannot be executed directly (e.g. within pytest or coverage).

stdevel commented 6 years ago

To fix this, the following lines need to be added to all CLI module files (authconfig.py, maintenance.py, parameters.py, populate.py, report.py, snapshot.py):

if __name__ == "__main__":
    cli()

Investigating on branch feature-cli_execute-issue97.

stdevel commented 6 years ago

Fixed in commit 2ed5216ec9f9d1dfc0bd21265ed60f33c4706e2c.