diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2017-03-29 11:43:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-29 11:43:57 +0200 |
| commit | ce5ceb7f100ff6c1e0692943e1680dc1951f4b63 (patch) | |
| tree | 44df6795cb50143c602c616b827da0fc854e4f74 /budget | |
| parent | 1b94f6738a1cfc117e2af78afdafdfeff84aecd0 (diff) | |
| parent | dfe8297faead666068c99533f79aa2e3de295269 (diff) | |
| download | ihatemoney-mirror-ce5ceb7f100ff6c1e0692943e1680dc1951f4b63.zip ihatemoney-mirror-ce5ceb7f100ff6c1e0692943e1680dc1951f4b63.tar.gz ihatemoney-mirror-ce5ceb7f100ff6c1e0692943e1680dc1951f4b63.tar.bz2 | |
Merge pull request #189 from JocelynDelalande/py34
Add Python 3.4 support
Diffstat (limited to 'budget')
| -rw-r--r-- | budget/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/budget/utils.py b/budget/utils.py index 1e887b8..f518049 100644 --- a/budget/utils.py +++ b/budget/utils.py @@ -99,7 +99,9 @@ def list_of_dicts2csv(dict_to_convert): try: if six.PY3: csv_file = StringIO() - csv_data = [dict_to_convert[0].keys()] + # using list() for py3.4 compat. Otherwise, writerows() fails + # (expecting a sequence getting a view) + csv_data = [list(dict_to_convert[0].keys())] for dic in dict_to_convert: csv_data.append([dic[h] for h in dict_to_convert[0].keys()]) else: |
