Project

Profile

Help

Issue #479

closed

pulp-admin does not handle exception while accessing non-existent config file

Added by igulina@redhat.com about 9 years ago. Updated about 5 years ago.

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

Description

Description of problem:
Traceback is returned while accessing non-existent config file

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

rpm -qa | grep pulp-admin

pulp-admin-client-2.4.0-0.29.beta.fc20.noarch

How reproducible:
always

Steps to Reproduce:

pulp-admin --config --help

Traceback (most recent call last):
File "/usr/bin/pulp-admin", line 9, in <module>
load_entry_point('pulp-client-admin==2.4.0', 'console_scripts', 'pulp-admin')()
File "/usr/lib/python2.7/site-packages/pulp/client/admin/__init__.py", line 35, in main
config_files, exception_handler_class=AdminExceptionHandler
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 66, in main
config = _load_configuration(config_filenames)
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 123, in _load_configuration
config = Config(*filenames)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 199, in init
self.open(input, filter)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 223, in open
fp = open(path)
IOError: [Errno 2] No such file or directory: '--help'

pulp-admin --config no_such_file

Traceback (most recent call last):
File "/usr/bin/pulp-admin", line 9, in <module>
load_entry_point('pulp-client-admin==2.4.0', 'console_scripts', 'pulp-admin')()
File "/usr/lib/python2.7/site-packages/pulp/client/admin/__init__.py", line 35, in main
config_files, exception_handler_class=AdminExceptionHandler
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 66, in main
config = _load_configuration(config_filenames)
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 123, in _load_configuration
config = Config(*filenames)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 199, in init
self.open(input, filter)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 223, in open
fp = open(path)
IOError: [Errno 2] No such file or directory: 'no_such_file'

pulp-admin --config=no_such_file

Traceback (most recent call last):
File "/usr/bin/pulp-admin", line 9, in <module>
load_entry_point('pulp-client-admin==2.4.0', 'console_scripts', 'pulp-admin')()
File "/usr/lib/python2.7/site-packages/pulp/client/admin/__init__.py", line 35, in main
config_files, exception_handler_class=AdminExceptionHandler
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 66, in main
config = _load_configuration(config_filenames)
File "/usr/lib/python2.7/site-packages/pulp/client/launcher.py", line 123, in _load_configuration
config = Config(*filenames)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 199, in init
self.open(input, filter)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 223, in open
fp = open(path)
IOError: [Errno 2] No such file or directory: 'no_such_file'

pulp-admin --config=no_such_file --help

Usage: pulp-admin [options]

Options:
-h, --help show this help message and exit
-u USERNAME, --username=USERNAME
credentials for the Pulp server; if specified will
bypass the stored certificate
-p PASSWORD, --password=PASSWORD
credentials for the Pulp server; must be specified
with --username
--debug enables debug logging
--config=CONFIG absolute path to the configuration file
--map prints a map of the CLI sections and commands

Expected results:
No such file or directory: 'no_such_file' + Error code [ `echo $?` -gt 0 ]

+ This bug was cloned from Bugzilla Bug #1125176 +

Actions #1

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #2

Updated by bmbouter about 5 years ago

  • Severity set to 1. Low

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #3

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF