Commit 54aa32fe authored by Ryan Herbert's avatar Ryan Herbert Committed by Mikaël Salson
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 00434fa1
Pipeline #33908 passed with stage
in 5 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