Commit 6a79c7e3 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

fuse.py only import VidjilParser if used

So that dependencies only need to be installed if VidjilParser is used.
Thanks @mikael-s :)
parent 71004774
Pipeline #33087 failed with stage
in 3 seconds
...@@ -41,8 +41,6 @@ from utils import * ...@@ -41,8 +41,6 @@ from utils import *
from defs import * from defs import *
from collections import defaultdict from collections import defaultdict
from vidjilparser import VidjilParser
FUSE_VERSION = "vidjil fuse" FUSE_VERSION = "vidjil fuse"
TOOL_SIMILARITY = "../algo/tools/similarity" TOOL_SIMILARITY = "../algo/tools/similarity"
...@@ -728,8 +726,11 @@ def main(): ...@@ -728,8 +726,11 @@ def main():
#filtre #filtre
f = [] f = []
vparser = VidjilParser() if args.ijson:
vparser.addPrefix('clones.item', 'clones.item.top', le, args.top) from vidjilparser import VidjilParser
vparser = VidjilParser()
vparser.addPrefix('clones.item', 'clones.item.top', le, args.top)
for path_name in files: for path_name in files:
if args.ijson: if args.ijson:
json_clones = vparser.extract(path_name) json_clones = vparser.extract(path_name)
......
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