diff options
author | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-10 16:31:18 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguz@sugarlabs.org> | 2012-02-10 16:31:18 (GMT) |
commit | 3898d861144dd77d59ba4b45f90afed243103541 (patch) | |
tree | 6b006f86db003f5081e7248e7d3c100e0ee9b5bf | |
parent | 0e0465dbbeabfa605e78c18bbcf77cfbefa8ed82 (diff) |
Code fixes
Signed-off-by: Agustin Zubiaga <aguz@sugarlabs.org>
-rw-r--r-- | activity.py | 11 | ||||
-rw-r--r-- | readers.py | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/activity.py b/activity.py index 807f32b..95a908d 100644 --- a/activity.py +++ b/activity.py @@ -446,21 +446,20 @@ class SimpleGraph(activity.Activity): response = chooser.run() if response == gtk.RESPONSE_ACCEPT: - object = chooser.get_selected_object() - metadata = object.metadata - file_path = object.file_path + jobject = chooser.get_selected_object() + metadata = jobject.metadata + file_path = jobject.file_path if metadata['mime_type'] == "activity/x-stopwatch": reader = StopWatch() - print "Desde StopWatch" f = open(file_path) reader.set_data(f) - list, count = reader.get_stopwatchs_with_marks() + stopwatchs_list, count = reader.get_stopwatchs_with_marks() if count == 1: - num, name = list[0] + num, name = stopwatchs_list[0] self.labels_and_values.model.clear() self.chart_data = [] @@ -3,8 +3,6 @@ # readers.py by: # Agustin Zubiaga <aguz@sugarlabs.com> -# Gonzalo Odiard <godiard@gmail.com> -# Manuel QuiƱones <manuq@laptop.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,13 +28,13 @@ class StopWatch(): def get_stopwatchs_with_marks(self): count = 0 - list = [] + stopwatchs_list = [] for i in self.data[-1]: if i: count += 1 - list.append([count, self.data[1][count - 1]]) + stopwatchs_list.append([count, self.data[1][count - 1]]) - return list, count + return stopwatchs_list, count def get_stopwatch_name(self, num=0): return self.data[1][num] |