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 resize_coordinate_window for python 3 #2745

Merged
merged 2 commits into from
Dec 11, 2019

Conversation

gregvonkuster
Copy link
Contributor

FOR CONTRIBUTOR:

  • - I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • - License permits unrestricted use (educational + commercial)
  • - This PR adds a new tool or tool collection
  • - This PR updates an existing tool or tool collection
  • - This PR does something else (explain below)

@@ -25,7 +25,7 @@ def stop_err(msg):
args = parser.parse_args()

extend_existing = args.extend_existing == 'existing'
out = open(args.output, 'wb')
out = open(args.output, 'w')
Copy link
Member

Choose a reason for hiding this comment

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

Can you also use sys.exit(msg) on line 13 ? I suspect otherwise msg would need to be bytestring.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, thanks @mvdbeek for pointing this out. I'm still getting familiar with some of these Python 3 twists - the sys.exit([arg]) description here https://docs.python.org/3/library/sys.html, states that integers are ok, so I left it alone. However, it also states that anything except an integer or None is printed to stderr and the exit code is set to 1. So should I also delete line 12 as part of this fix?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's more concise and that way we don't need to care about how we write to sys.stderr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done - thanks! ;)

@bgruening bgruening merged commit d357611 into galaxyproject:master Dec 11, 2019
@gregvonkuster gregvonkuster deleted the resize_coord_win branch April 25, 2020 12:59
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.

3 participants