-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes show commands failure when database is not ready #699
base: master
Are you sure you want to change the base?
Fixes show commands failure when database is not ready #699
Conversation
Change-Id: I3857bd80ab9667f5f2bd93496d0205eb97962246
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the redundant print statement
config_db = ConfigDBConnector() | ||
config_db.connect() | ||
except Exception as e: | ||
click.echo ("System is not ready - Core services are not up") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space between echo
and opening parenthesis.
try: | ||
config_db = ConfigDBConnector() | ||
config_db.connect() | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a more specific Exception(s) here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add it
Change-Id: I3857bd80ab9667f5f2bd93496d0205eb97962246
- What I did
Fixes show commands failure when the database is not ready:
When interface show commands are executed before database service ready, it throws a connection error.
- How I did it
Added try..catch block for the database connection object.
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)
-->