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

Python3 and other fixes #11

Merged
merged 21 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion activity/activity.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = Analyze Journal
activity_version = 4
bundle_id = org.sugarlabs.AnalyzeJournal
exec = sugar-activity activity.AnalyzeJournal
exec = sugar-activity3 activity.AnalyzeJournal
icon = analyzejournal
license = GPLv3+
summary = chart of Sugar Journal activity
Expand Down
8 changes: 4 additions & 4 deletions readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import os
import glob
import statvfs
import shutil
JuiP marked this conversation as resolved.
Show resolved Hide resolved

from gettext import gettext as _

Expand Down Expand Up @@ -63,9 +63,9 @@ def get_chart_data(self):
return chart_data

def _get_space(self):
stat = os.statvfs(env.get_profile_path())
free_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
total_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BLOCKS]
total_space, used_space, free_space = shutil.disk_usage(env.get_profile_path())
#free_space = stat[statvfs.f_bsize] * stat[statvfs.f_bavail]
#total_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BLOCKS]

free_space = self._get_MBs(free_space)
total_space = self._get_MBs(total_space)
Expand Down