Skip to content
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

First refactoring for better readability #35

Merged
merged 8 commits into from
Feb 10, 2022
Merged

Conversation

LegenJCdary
Copy link
Collaborator

No description provided.

@LegenJCdary LegenJCdary marked this pull request as draft February 9, 2022 22:54
@LegenJCdary LegenJCdary marked this pull request as ready for review February 10, 2022 01:09
@@ -20,20 +20,11 @@
LOG_NAME_FRMT = "ansible-deploy_execution_{}.log"


def get_sub_command(command):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure.. this removes the guarantee that subcommand is one of the fixed strings...

@@ -502,13 +502,13 @@ def main():
sys.exit(2)
options = parse_options(sys.argv[1:])

log_dir = None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we'll add a configuration or option for log_dir one day to allow file logging for other commands?

@@ -504,11 +504,9 @@ def main():
workdir = None

logger = set_logging(workdir, start_ts, options)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like commits just removing/adding blank lines it just makes git blame more dificult to read

@@ -520,7 +518,7 @@ def main():
else:
lockdir = os.path.join(conf["global_paths"]["work_dir"], "locks")
inv_file = get_inventory_file(config, options)
lockpath = os.path.join(lockdir, inv_file.replace(os.sep, "_"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we left the basename? basename is a bug

import yaml
from cerberus import Validator
#TODO: Add an option to explicitly enable syslog logging
#from logging import handlers as log_han


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's good one , separate comit for blank lines cleanup

@LegenJCdary LegenJCdary requested a review from cinek810 February 10, 2022 08:28
@LegenJCdary LegenJCdary merged commit 5c61535 into main Feb 10, 2022
@LegenJCdary LegenJCdary deleted the first_refactor branch February 10, 2022 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants