Skip to content

Fix resize_coordinate_window for python 3#2745

Merged
bgruening merged 2 commits intogalaxyproject:masterfrom
gregvonkuster:resize_coord_win
Dec 11, 2019
Merged

Fix resize_coordinate_window for python 3#2745
bgruening merged 2 commits intogalaxyproject:masterfrom
gregvonkuster:resize_coord_win

Conversation

@gregvonkuster
Copy link
Copy Markdown
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)


extend_existing = args.extend_existing == 'existing'
out = open(args.output, 'wb')
out = open(args.output, 'w')
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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