Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tika/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#

from .tika import parse1, callServer, ServerEndpoint
import os
import json

def from_file(filename, serverEndpoint=ServerEndpoint, service='all', xmlContent=False, headers=None, config_path=None, requestOptions={}, raw_response=False):
Expand Down Expand Up @@ -86,7 +85,7 @@ def _parse(output, service='all'):
return parsed

parsed["status"] = output[0]
if output[1] == None or output[1] == "":
if output[1] is None or output[1] == "":
return parsed

if service == "text":
Expand Down
2 changes: 1 addition & 1 deletion tika/tika.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def runCommand(cmd, option, urlOrPaths, port, outDir=None,
:return: response for the command, usually a ``dict``
'''
# import pdb; pdb.set_trace()
if (cmd in 'parse' or cmd in 'detect') and (urlOrPaths == [] or urlOrPaths == None):
if (cmd in 'parse' or cmd in 'detect') and (urlOrPaths == [] or urlOrPaths is None):
log.exception('No URLs/paths specified.')
raise TikaException('No URLs/paths specified.')
serverEndpoint = 'http://' + serverHost + ':' + port
Expand Down