diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-02-26 16:48:44 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-02-26 16:48:44 (GMT) |
commit | 6f21b8133cb583901810853b478a51fe6aaea311 (patch) | |
tree | 9fd37ab41f71f5c81df044f2e60f81be3e88d5eb /pysamples/save_heap_to_journal_entry.py | |
parent | 2267a2997a2e03b5a2ff7830ec22b02ae57875e6 (diff) |
pep8 cleanup
Diffstat (limited to 'pysamples/save_heap_to_journal_entry.py')
-rw-r--r-- | pysamples/save_heap_to_journal_entry.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pysamples/save_heap_to_journal_entry.py b/pysamples/save_heap_to_journal_entry.py index c4f2d50..2589164 100644 --- a/pysamples/save_heap_to_journal_entry.py +++ b/pysamples/save_heap_to_journal_entry.py @@ -21,7 +21,8 @@ # This procedure is invoked when the user-definable block on the "extras" # palette is selected. -def myblock(lc, x): + +def myblock(lc, title): ########################################################################### # @@ -39,7 +40,8 @@ def myblock(lc, x): from tautils import get_path, data_to_file # Save JSON-encoded heap to temporary file - heap_file = os.path.join(get_path(activity, 'instance'), str(x) + '.txt') + heap_file = os.path.join(get_path(activity, 'instance'), + str(title) + '.txt') data_to_file(lc.heap, heap_file) # Create a datastore object @@ -47,7 +49,7 @@ def myblock(lc, x): # Write any metadata (specifically set the title of the file # and specify that this is a plain text file). - dsobject.metadata['title'] = str(x) + dsobject.metadata['title'] = str(title) dsobject.metadata['icon-color'] = profile.get_color().to_string() dsobject.metadata['mime_type'] = 'text/plain' dsobject.set_file_path(heap_file) |