-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
1a715cc
to
3e923df
Compare
@@ -20,20 +20,11 @@ | |||
LOG_NAME_FRMT = "ansible-deploy_execution_{}.log" | |||
|
|||
|
|||
def get_sub_command(command): |
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'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 |
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.
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) | |||
|
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 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, "_")) |
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.
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 | ||
|
||
|
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.
that's good one , separate comit for blank lines cleanup
48aa6d9
to
b49dff1
Compare
Replace usage of base_dir with global conf workdir
b49dff1
to
28c3e0c
Compare
28c3e0c
to
e5c0a74
Compare
No description provided.