Description of problem: imgbase base --of-layer fails with exception when base is provided instead of a layer. Version-Release number of selected component (if applicable): imgbased-0.8.11-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. base --of-layer <BASE> Actual results: imgbase base --of-layer rhvh-4.0-0.20170104.0 Base Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 51, in <module> CliApplication() File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 82, in CliApplication app.hooks.emit("post-arg-parse", args) File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit cb(self.context, *args) File "/usr/lib/python2.7/site-packages/imgbased/plugins/core.py", line 139, in post_argparse print(str(app.imgbase.base_of_layer(args.of_layer))) File "/usr/lib/python2.7/site-packages/imgbased/imgbase.py", line 339, in base_of_layer return Image.from_nvr(layer).base AttributeError: 'Base' object has no attribute 'base' Expected results: An error message is provided or the same base is reported back. Additional info: # imgbase base --of-layer rhvh-4.0-0.20170104.0+1 rhvh-4.0-0.20170104.0 # imgbase base --of-layer rhvh-4.0-0.20170104.0 Base Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 51, in <module> CliApplication() File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 82, in CliApplication app.hooks.emit("post-arg-parse", args) File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit cb(self.context, *args) File "/usr/lib/python2.7/site-packages/imgbased/plugins/core.py", line 139, in post_argparse print(str(app.imgbase.base_of_layer(args.of_layer))) File "/usr/lib/python2.7/site-packages/imgbased/imgbase.py", line 339, in base_of_layer return Image.from_nvr(layer).base AttributeError: 'Base' object has no attribute 'base' Base class does not have a base object so when the base is detected instead of layer the exception is raised.
QE can reproduce this issue.
Test version: redhat-virtualization-host-4.1-20170222.0 imgbased-0.9.13-0.1.el7ev.noarch Test step: # imgbase w [INFO] You are on rhvh-4.1-0.20170223.0+1 # imgbase base --of-layer rhvh-4.1-0.20170223.0+1 rhvh-4.1-0.20170223.0 # Test result: imgbase base --of-layer - pass So the bug is fixed, change bug status to VERIFIED.