Skip to content

Commit 7b7f84f

Browse files
committed
chore: remove legacy file type checking
1 parent 90144ea commit 7b7f84f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tika/tika.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
detected = detector.from_buffer('some buffered content', config_path='/path/to/configfile')
5757
5858
'''
59-
import types
6059

6160
USAGE = """
6261
tika.py [-v] [-e] [-o <outputDir>] [--server <TikaServerEndpoint>] [--install <UrlToTikaServerJar>] [--port <portNumber>] <command> <option> <urlOrPathToFile>
@@ -723,12 +722,7 @@ def toFilename(url):
723722

724723

725724
def _is_file_object(f):
726-
try:
727-
file_types = (types.FileType, io.IOBase)
728-
except AttributeError:
729-
file_types = (io.IOBase,)
730-
731-
return isinstance(f, file_types)
725+
return isinstance(f, io.IOBase)
732726

733727

734728
def _urlretrieve(

0 commit comments

Comments
 (0)