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

Fix pserve argument ordering. #1095

Merged
merged 6 commits into from
Mar 3, 2017
Merged

Fix pserve argument ordering. #1095

merged 6 commits into from
Mar 3, 2017

Conversation

Natim
Copy link
Member

@Natim Natim commented Feb 20, 2017

Refs: Pylons/pyramid#2962

Fixes #1092

  • Add documentation.
  • Add tests.
  • Add a changelog entry.

Copy link
Contributor

@leplatrem leplatrem left a comment

Choose a reason for hiding this comment

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

r+ with a changelog entry ;)

pserve_argv.append('http_port={}'.format(parsed_args['port']))
pserve.main(pserve_argv)
print(pserve_argv)
Copy link
Contributor

Choose a reason for hiding this comment

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

left over or useful info?

if parsed_args['reload']:
pserve_argv.append('--reload')
pserve_argv.append('-v')
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add this only if our verbose option is set?

@glasserc
Copy link
Contributor

The fact that the argument order is important seems like a bug; should we report it upstream?

@Natim
Copy link
Member Author

Natim commented Feb 21, 2017

The fact that the argument order is important seems like a bug; should we report it upstream?

We have the exact same issue with kinto and subcommands.

The command help explicits it so it doesn't seems like a bug to me.

@gabisurita gabisurita mentioned this pull request Mar 3, 2017
1 task
res = main(['--ini', TEMP_KINTO_INI, 'start', '-v'])
assert res == 0
assert mocked_pserve.call_count == 1
assert mocked_pserve.call_args_list[0][1]['argv'][1] == '-v'
Copy link
Member Author

Choose a reason for hiding this comment

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

We could probably use call_args instead of call_args_list.

@Natim Natim changed the title WIP: Fix pserve argument ordering. Fix pserve argument ordering. Mar 3, 2017
@Natim Natim merged commit c915f6e into master Mar 3, 2017
@Natim Natim deleted the 1092-fix-pserve branch March 3, 2017 18:05
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.

4 participants