Commit 4294724c authored by Pratap Vardhan's avatar Pratap Vardhan
Browse files

FIX: lint errors

parent b208ba82
Pipeline #114232 passed with stages
in 41 seconds
......@@ -18,7 +18,7 @@ const apis = {
pdftojson: function (opts) {
return $.getJSON('./pdftojson', {filename: opts.filename})
.done(data => $(window).trigger('data-table', data))
.fail(() => console.log('ERROR: pdftojson'))
.fail(() => console.log('ERROR: pdftojson')) // eslint-disable-line no-console
}
}
// setup elements
......
......@@ -2,6 +2,7 @@ from io import StringIO
import logging
import pandas as pd
import camelot
from gramex.http import BAD_REQUEST
logging.getLogger('pdfminer').setLevel(logging.ERROR)
......@@ -23,7 +24,7 @@ def extract_table(path):
def pdftojson(handler):
filename = handler.args.get('filename', [False])[0]
if not filename:
return handler.set_status(400)
return handler.set_status(BAD_REQUEST)
result = extract_table(handler.kwargs.path + filename)
return {
'data': result['df'].to_dict(orient='r'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment