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

katprep_populate: Local variable ‘mon_hosts‘ referenced before assignment #111

Open IncredibleRichie opened 6 years ago

IncredibleRichie commented 6 years ago

I think its a problem. Using Foreman (Orcharhino)

If i try the populate command i get UnboundLocalError: local variable 'mon_hosts' referenced before assignment. Here is the full output:

katprep_populate -s host.fqdn --virt-uri 192.168.xxx.x --virt-type pyvmomi --skip-mon --insecure
Authentication container password: 
Foreman Username:    
Foreman Password: 
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Virtualization Username: xxx@xxx.de
Virtualization Password: 
INFO:katprep_populate:Gathering host inventory information. This *WILL* take some time - please be patient.
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Traceback (most recent call last):
  File "/usr/bin/katprep_populate", line 9, in <module>
    load_entry_point('katprep==0.5.0', 'console_scripts', 'katprep_populate')()
  File "build/bdist.linux-x86_64/egg/katprep/populate.py", line 351, in cli
  File "build/bdist.linux-x86_64/egg/katprep/populate.py", line 330, in main
  File "build/bdist.linux-x86_64/egg/katprep/populate.py", line 106, in populate
UnboundLocalError: local variable 'mon_hosts' referenced before assignment
stdevel commented 6 years ago

Hi richielatk!

Thanks for sharing, I will check this out when I have some spare time and let you know what I found out. Looks like this might be related to #92.

Best regards, Christian.