Bug 641438

Summary: running repo status on non existing repo throws Type Error
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mmccune, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-17 16:51:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description Preethi Thomas 2010-10-08 17:56:33 UTC
Description of problem:


[root@preethi ~]# pulp-admin repo status --id=rt
+------------------------------------------+
                Status for rt
+------------------------------------------+

Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 24, in <module>
    PulpAdmin().main()
  File "/usr/lib/python2.6/site-packages/pulp/client/cli/base.py", line 101, in main
    command.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 145, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 264, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/repo.py", line 85, in run
    print _('repository: %s') % repo['id']
TypeError: 'NoneType' object is unsubscriptable

Comment 1 Preethi Thomas 2010-10-08 18:28:41 UTC
[root@preethi ~]# pulp-admin repo content --id=f5

Traceback (most recent call last):
  File "/usr/bin/pulp-admin", line 24, in <module>
    PulpAdmin().main()
  File "/usr/lib/python2.6/site-packages/pulp/client/cli/base.py", line 101, in main
    command.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 145, in main
    action.main(args[1:])
  File "/usr/lib/python2.6/site-packages/pulp/client/core/base.py", line 264, in main
    self.run()
  File "/usr/lib/python2.6/site-packages/pulp/client/core/repo.py", line 116, in run
    files = repo['files']
TypeError: 'NoneType' object is unsubscriptable

Comment 2 Jason Connor 2010-10-28 15:09:50 UTC
Added common method to get a repo in the RepoAction bas class that used the existing error message from the update command
Fixed the status, content, sync, cancel_sync, and clone commands

Comment 3 Jay Dobies 2010-10-29 16:58:28 UTC
Fixed in 0.77.

Comment 4 Jay Dobies 2010-11-03 19:35:29 UTC
Fixed in build 0.78.

Comment 5 Preethi Thomas 2010-11-05 18:11:20 UTC
verified


[root@preethi ~]# pulp-admin repo status --id=test
Repository with id: [test] not found

Comment 6 Preethi Thomas 2011-02-17 16:51:58 UTC
Closing with community release 

pulp-0.0.139-1.fc14.noarch