mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-04-10 14:06:41 +00:00
Very minor refactor
This commit is contained in:
parent
4b151966b3
commit
213cc61da9
@ -1,6 +1,5 @@
|
||||
import json
|
||||
import elasticsearch
|
||||
from elasticsearch.exceptions import TransportError
|
||||
from threading import Thread
|
||||
import subprocess
|
||||
import requests
|
||||
@ -34,7 +33,7 @@ class Indexer:
|
||||
|
||||
@staticmethod
|
||||
def run_elasticsearch():
|
||||
|
||||
|
||||
if platform.system() == "Windows":
|
||||
subprocess.Popen(["elasticsearch\\bin\\elasticsearch.bat"])
|
||||
else:
|
||||
|
@ -29,7 +29,9 @@ class MimeGuesser:
|
||||
|
||||
|
||||
class ContentMimeGuesser(MimeGuesser):
|
||||
|
||||
def __init__(self):
|
||||
import magic
|
||||
self.libmagic = magic.Magic(mime=True)
|
||||
|
||||
def guess_mime(self, full_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user