Skip to content

Commit

Permalink
Corrijo sugerencias de pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
capitantoto committed Jan 9, 2017
1 parent b30895d commit 490b5d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydatajson/xlsx_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
def sheet_to_table(worksheet):
"""Transforma una hoja del libro en una lista de diccionarios."""
def value(cell):
"""Extrae el valor de una celda de Excel."""
value = cell.value
if isinstance(value, (str, unicode)):
value = value.strip()
Expand Down Expand Up @@ -257,7 +258,8 @@ def main():
# Si hay un segundo parámetro no obligatorio, se asume que ese es el
# path de destino. Si no se provee, se reutiliza el path de input con
# la extensión cambiada.
data_json = args.pop(0) if args else data_xlsx.replace(".xlsx",".json")
data_json = args.pop(0) if args else data_xlsx.replace(".xlsx",
".json")

catalog = read_local_xlsx_catalog(data_xlsx)
write_json_catalog(catalog, data_json)
Expand Down

0 comments on commit 490b5d4

Please sign in to comment.