diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-13 19:20:51 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-13 19:20:51 (GMT) |
commit | d187afec8d42af8c7cc27cfd6c40f6c11babe99e (patch) | |
tree | ccf7580b1a3fdfde711db842543ed23539d26a7d /activity.py | |
parent | 95142f2dd1eeb773585a901e2328ecbc048c0c25 (diff) |
pep8 fixes
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/activity.py b/activity.py index b9cca6a..622aeb7 100644 --- a/activity.py +++ b/activity.py @@ -451,32 +451,32 @@ class SimpleGraph(activity.Activity): file_path = jobject.file_path if metadata['mime_type'] == "application/x-stopwatch-activity": - reader = StopWatch() - - f = open(file_path) - reader.set_data(f) - - stopwatchs_list, count = reader.get_stopwatchs_with_marks() - - if count == 1: - num, name = stopwatchs_list[0] - - self.labels_and_values.model.clear() - self.chart_data = [] - - self.h_label.entry.set_text("Number") - self.v_label.entry.set_text("Time") - - self.set_title(name) - chart_data = reader.marks_to_chart_data(num - 1) - - # Load the data - for row in chart_data: - self._add_value(None, label=row[0], value=float(row[1])) - - self.update_chart() - - f.close() + reader = StopWatch() + + f = open(file_path) + reader.set_data(f) + + stopwatchs_list, count = reader.get_stopwatchs_with_marks() + + if count == 1: + num, name = stopwatchs_list[0] + + self.labels_and_values.model.clear() + self.chart_data = [] + self.h_label.entry.set_text("Number") + self.v_label.entry.set_text("Time") + + self.set_title(name) + chart_data = reader.marks_to_chart_data(num - 1) + + # Load the data + for row in chart_data: + self._add_value(None, + label=row[0], value=float(row[1])) + + self.update_chart() + + f.close() else: alert = Alert() |