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 Resource Paths in REPL #270

Merged
merged 5 commits into from
May 16, 2019
Merged

Fix Resource Paths in REPL #270

merged 5 commits into from
May 16, 2019

Conversation

AstraLuma
Copy link
Member

Fix the crashing bug when running PPB in a REPL by using the CWD when the module is __main__.

Closes #267.

@AstraLuma AstraLuma requested a review from a team as a code owner May 14, 2019 14:21
ppb/sprites.py Outdated
@@ -296,5 +293,8 @@ def __image__(self):

def __resource_path__(self):
if self.resource_path is None:
self.resource_path = Path(realpath(getfile(type(self)))).absolute().parent
if type(self).__module__ == '__main__':
Copy link
Collaborator

Choose a reason for hiding this comment

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

This breaks the examples if you run them from the project root.

@pathunstrom
Copy link
Collaborator

Okay, as per slack, going to merge this.

@pathunstrom
Copy link
Collaborator

bors r+

bors bot added a commit that referenced this pull request May 16, 2019
270: Fix Resource Paths in REPL r=pathunstrom a=astronouth7303

Fix the crashing bug when running PPB in a REPL by using the CWD when the module is `__main__`.

Closes #267.

Co-authored-by: Jamie Bliss <jamie@ivyleav.es>
Co-authored-by: Piper Thunstrom <pathunstrom@gmail.com>
@bors
Copy link
Contributor

bors bot commented May 16, 2019

Build succeeded

  • docs
  • Linux python:3.6-slim
  • Linux python:3.7-slim
  • macOS PYTHON:3.6.8
  • macOS PYTHON:3.7.2
  • Windows python:3.6-windowsservercore-1809
  • Windows python:3.7-windowsservercore-1809

@bors bors bot merged commit 09741c9 into ppb:master May 16, 2019
@AstraLuma AstraLuma deleted the fix-sprite-repl branch May 19, 2019 03:14
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.

VFS can't find files without packages
2 participants