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

Change path passed to disk_usage to be the file's parent directory #40

Merged
merged 3 commits into from
Aug 5, 2020

Conversation

haotongwang
Copy link
Contributor

Description

In backend.py, disk_usage (docs) is used to find the space left on the disk. Currently, __file__ (the path to the executing file) is passed to it but this is only introduced in python 3.8 while the install instructions state that python 3.7.7 is to be used.

Using __file__ in a NotADirectory error for me, whereas using the parent directory of __file__ works as expected.

Steps to Test

  1. Install raspicam

  2. Run python overlay_new.py

backend/backend.py Outdated Show resolved Hide resolved
backend/backend.py Outdated Show resolved Hide resolved
Copy link

@emilytrau emilytrau left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@nix-chu nix-chu left a comment

Choose a reason for hiding this comment

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

Thanks for doing that 👍

Copy link
Member

@hallgchris hallgchris left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@haotongwang haotongwang merged commit 41b9b6a into master Aug 5, 2020
@haotongwang haotongwang deleted the haotongwang/disk-usage-path branch August 5, 2020 03:27
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