Bug 641438 - running repo status on non existing repo throws Type Error
Summary: running repo status on non existing repo throws Type Error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-10-08 17:56 UTC by Preethi Thomas
Modified: 2014-03-31 01:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-17 16:51:58 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.