Skip to content

Show warning when pygame is not available - #269

Merged
ltratt merged 1 commit into
softdevteam:masterfrom
ptersilie:nopygame
Oct 31, 2019
Merged

ltratt merged 1 commit into
softdevteam:masterfrom
ptersilie:nopygame

Conversation

@ptersilie

Copy link
Copy Markdown
Member

When trying to view the parse tree and pygame isn't installed, show a
warning and disable the menu entry.

Comment thread lib/eco/eco.py
self.btReparse([])

def showPygameTree(self):
try:

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.

This puts more stuff than necessary in the try I think? Could we not do something like:

os.environ[...] = ...
try:
    import pygame
except ImportError:
    ...
    return
self.ui.actionPvShow...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed. The self.ui stuff wasn't needed here so I removed it.

@ltratt

ltratt commented Oct 31, 2019

Copy link
Copy Markdown
Member

Please squash.

When trying to view the parse tree and pygame isn't installed, show a
warning and disable the menu entry.
@ptersilie

Copy link
Copy Markdown
Member Author

Squashed!

@ltratt
ltratt merged commit 5a2e6c6 into softdevteam:master Oct 31, 2019
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.

2 participants