Project

Profile

Help

Issue #491

--summary option on repo list causes an error

Added by igulina@redhat.com over 6 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.4 Beta
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
If there are no repos, an error is returnd on

pulp-admin rpm repo list --summary, -s

and

pulp-admin repo list --summary, -s

Version-Release number of selected component (if applicable):

rpm -qa | grep pulp-server

pulp-server-2.4.1-0.2.alpha.fc20.noarch

How reproducible:
always, if there are no repos

Steps to Reproduce:

pulp-admin -u admin -p admin rpm repo list

--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

pulp-admin -u admin -p admin rpm repo list -s

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

pulp-admin -u admin -p admin rpm repo list --summary

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

pulp-admin -u admin -p admin rpm repo list --all

--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

--------------------------------------------------------------------
Other Pulp Repositories
--------------------------------------------------------------------

pulp-admin -u admin -p admin rpm repo create --repo-id=gena

Successfully created repository [gena]

pulp-admin -u admin -p admin rpm repo list

--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

Id: gena
Display Name: gena
Description: None
Content Unit Counts:

pulp-admin -u admin -p admin rpm repo list -s

gena gena

pulp-admin -u admin -p admin rpm repo list --summary

gena gena

pulp-admin -u admin -p admin repo list -s
gena gena

pulp-admin -u admin -p admin rpm repo delete --repo-id=gena

This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [gena] successfully deleted

pulp-admin -u admin -p admin repo list

--------------------------------------------------------------------
Repositories
--------------------------------------------------------------------

pulp-admin -u admin -p admin repo list -s

An unexpected error has occurred. More information can be found in the client
log file ~/.pulp/admin.log.

Traceback:

tail -30 ~/.pulp/admin.log

2014-08-21 11:33:52,972 - ERROR - Client-side exception occurred
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run
exit_code = Cli.run(self, args)
File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
exit_code = command_or_section.execute(self.prompt, remaining_args)
File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
return self.method(arg_list, **clean_kwargs)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 337, in run
self.display_repository_summaries(
*kwargs)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 394, in display_repository_summaries
_default_summary_view(repo_list, self.prompt)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 494, in _default_summary_view
max_id_width = max(len(r['id']) for r in repo_list)
ValueError: max() arg is an empty sequence
2014-08-21 11:34:01,184 - ERROR - Client-side exception occurred
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 478, in run
exit_code = Cli.run(self, args)
File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
exit_code = command_or_section.execute(self.prompt, remaining_args)
File "/usr/lib/python2.7/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
return self.method(arg_list, **clean_kwargs)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 337, in run
self.display_repository_summaries(
*kwargs)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 394, in display_repository_summaries
_default_summary_view(repo_list, self.prompt)
File "/usr/lib/python2.7/site-packages/pulp/client/commands/repo/cudl.py", line 494, in _default_summary_view
max_id_width = max(len(r['id']) for r in repo_list)
ValueError: max() arg is an empty sequence

+ This bug was cloned from Bugzilla Bug #1132458 +

History

#2 Updated by cduryee over 6 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1132458 comment 2 +

#3 Updated by igulina@redhat.com over 6 years ago

rpm -qa | grep pulp-server

pulp-server-2.6.0-0.2.beta.fc20.noarch

pulp-admin -u admin -p admin rpm repo create --repo-id test

Successfully created repository [test]

pulp-admin repo list --summary

test test

pulp-admin repo list -s

test test

pulp-admin -u admin -p admin rpm repo delete --repo-id test

This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [test] successfully deleted

pulp-admin repo list -s
pulp-admin repo list --summary

+ This comment was cloned from Bugzilla #1132458 comment 3 +

#4 Updated by rbarlow over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#6 Updated by bmbouter over 2 years ago

  • Severity set to 2. Medium

#7 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF