Skip to content

Commit

Permalink
Fixes #93: Fix bug in csvToJson method.
Browse files Browse the repository at this point in the history
  • Loading branch information
YJDave committed Jan 31, 2018
1 parent ea5f8fc commit 805f5b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loklak.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ def xmlToJson(self, xmlData = None):

def csvToJson(self, csvData = None, fieldnamesList = None):
"""Convert CSV to JSON as the service."""
jsonData = ''
jsonData = '[]'
if csvData:
data = csv.DictReader( csvData, fieldnames = fieldnamesList)
jsonData = json.dumps( [ row for row in data ] )
return out
return jsonData

def hello(self):
"""Retrieve a json response about the basic status of the server."""
Expand Down

0 comments on commit 805f5b7

Please sign in to comment.