Adds small print enhancements to Travis testcase run.
Fixed errors in backend.py of configparser usage. Data has to be converted to dictionary before reference. It appears to have worked with older versions of Python, but now, it seems, newer version of Python is used when Travis VM is created. As a result the following testcase run errors are displayed:
'RUN:xcat-inventory init [Tue Aug 18 16:57:40 2020]',
'ElapsedTime:1 sec',
'RETURN rc = 1',
'OUTPUT:',
'Traceback (most recent call last):',
' File "/opt/xcat/lib/python/xcclient/inventory/shell.py", line 167, in main',
' InventoryShell(\'xcat-inventory\',\'0.1.7 (git commit 196b9ca447c77510e95c88ae544f7be146cebe46)\').run(sys.argv[1:], \'1.0\', "xCAT inventory management tool")',
' File "/opt/xcat/lib/python/xcclient/shell.py", line 207, in run',
' return args.func(args)',
' File "/opt/xcat/lib/python/xcclient/inventory/shell.py", line 85, in do_init',
' mybackend.init()',
' File "/opt/xcat/lib/python/xcclient/inventory/backend.py", line 109, in init',
' self.loadcfg(cfgpath)',
' File "/opt/xcat/lib/python/xcclient/inventory/backend.py", line 49, in loadcfg',
' for key in config[\'backend\']:',
'AttributeError: ConfigParser instance has no attribute \'__getitem__\'',
After this PR, the Travis run completes with no errors.
This PR:
Fixed errors in
backend.py
ofconfigparser
usage. Data has to be converted to dictionary before reference. It appears to have worked with older versions of Python, but now, it seems, newer version of Python is used when Travis VM is created. As a result the following testcase run errors are displayed:After this PR, the Travis run completes with no errors.