-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add --keep-locked option #89
Conversation
2d841e3
to
77703c8
Compare
@@ -541,7 +544,11 @@ def run_playitem(config: dict, options: dict, inventory: str, lockpath: str): | |||
logger.error("'%s' failed due to:", command) | |||
for line in std_e.split(b"\n\n"): | |||
logger.error(line.decode("utf-8")) | |||
unlock_inventory(lockpath) |
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.
I feel that the whole try block should go to sparate function to reduc e number of branches?
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.
or just put this in unloc_inventory to avoid code duplication, just pass it a bool options["keep_locked"]
tests/pylintrc
Outdated
@@ -518,7 +518,7 @@ max-attributes=7 | |||
max-bool-expr=5 | |||
|
|||
# Maximum number of branch for function / method body. | |||
max-branches=16 |
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.
w can't continue increasing it, we need to work on that to decrase the branches
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.
Alright, I'll do that with #84
77703c8
to
a708115
Compare
ad47937
to
dd46453
Compare
ansible_deployer/command_line.py
Outdated
logger.critical(exc) | ||
sys.exit(64) | ||
else: | ||
logger.debug("Requested infra %s:%s remains locked.", options["infra"], options["stage"]) |
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.
Personally, it will be easier (for me) to understand message refering to '--keep-locked' option
dd46453
to
1a27a0b
Compare
1a27a0b
to
1bd83dc
Compare
fixing issue #87