Description of problem: Needs to have error handling when you run repo delete on empty repo-id Version-Release number of selected component (if applicable): [root@pulp-candidate ~]# rpm -q pulp-rpm-server pulp-rpm-server-2.0.1-1.fc17.noarch [root@pulp-candidate ~]# How reproducible: Steps to Reproduce: 1. [root@pulp-candidate ~]# pulp-admin repo delete --repo-id= An unexpected error has occurred. More information can be found in the client log file ~/.pulp/admin.log. 2. 3. Actual results: Expected results: Additional info: 2012-08-28 13:44:11,099 - ERROR - Client-side exception occurred Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/client/extensions/core.py", line 475, in run exit_code = Cli.run(self, args) File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 891, in run exit_code = command_or_section.execute(self.prompt, remaining_args) File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 184, in execute return self.method(*arg_list, **clean_kwargs) File "/usr/lib/pulp/admin/extensions/rpm_repo/pulp_cli.py", line 180, in delete response = self.context.server.repo.delete(repo_id) File "/usr/lib/python2.7/site-packages/pulp/bindings/repository.py", line 87, in delete return self.server.DELETE(path) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 78, in DELETE return self._request('DELETE', path, body=body) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 134, in _request self._handle_exceptions(response_code, response_body) File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 153, in _handle_exceptions raise exceptions.PulpServerException(response_body) File "/usr/lib/python2.7/site-packages/pulp/bindings/exceptions.py", line 28, in __init__ self.href = response_body.pop('_href', None) AttributeError: 'str' object has no attribute 'pop'
Fixed recently and should be in the current QE build.
[root@pulp-master scripts]# pulp-admin repo delete --repo-id= Command: delete Description: deletes a repository Available Arguments: --repo-id - (required) identifies the repository to delete The following options are required but were not specified: --repo-id [root@pulp-master scripts]# [root@pulp-master scripts]# [root@pulp-master scripts]# pulp-admin repo delete --repo-id="" Command: delete Description: deletes a repository Available Arguments: --repo-id - (required) identifies the repository to delete The following options are required but were not specified: --repo-id [root@pulp-master scripts]#
Pulp v2.0 released