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

Tracebacks on agent.py info and changed how get_config() receives options and args, fixes #329 #336

Merged
merged 2 commits into from
Jan 10, 2013

Conversation

pcockwell
Copy link
Contributor

Tracebacks are now available by doing -v or --verbose

Also, now in get_config(), parse_args is False by default, and allows the passing of both options and args. This way when main is called - get_parsed_args() isn't called twice.

@@ -73,7 +73,7 @@ def run(self):
CollectorStatus().persist()

# Intialize the collector.
agentConfig = self._set_agent_config_hostname(get_config())
agentConfig = self._set_agent_config_hostname(get_config(parse_args=true))
Copy link
Member

Choose a reason for hiding this comment

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

A couple things here. First, it should be True and not true. Second, won't this still parse the args twice on Agent start? Once in main() and once here. Maybe we can pass the value for options into run()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since options isn't used anywhere in the Agent run(), I decided to pass in the agentConfig from main(). I modified run so that if does not receive a config or it is None, it will run get_config(parse_args=True), but otherwise it will just pass along the config as needed.

conorbranagan added a commit that referenced this pull request Jan 10, 2013
Tracebacks on agent.py info and changed how get_config() receives options and args, fixes #329
@conorbranagan conorbranagan merged commit 94406d0 into master Jan 10, 2013
@pcockwell pcockwell deleted the info_traceback_2 branch January 10, 2013 21:41
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.

None yet

2 participants