Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitextor/bicleaner-ai.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZJaume <jzaragoza@prompsit.com>2022-08-19 14:15:55 +0300
committerZJaume <jzaragoza@prompsit.com>2022-08-19 14:15:55 +0300
commit7c480d08eae2a0b6245fa7133114de9069d43155 (patch)
tree75cd7a97e90d397d9a208f3dc2ae8c99ec062ec4
parentc14dc71e894ba96e287ffb5f61912d2df09c90a4 (diff)
Don't load Hardrules objects if disabled
-rw-r--r--bicleaner_ai/classify.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bicleaner_ai/classify.py b/bicleaner_ai/classify.py
index 1306692..ea256e6 100644
--- a/bicleaner_ai/classify.py
+++ b/bicleaner_ai/classify.py
@@ -160,7 +160,11 @@ def classify(args, input, output):
buf_sent_sl = []
buf_sent_tl = []
buf_score = []
- hardrules = Hardrules(args)
+ # Don't load hardrules objects if disabled
+ if args.disable_hardrules:
+ hardrules = None
+ else:
+ hardrules = Hardrules(args)
# Process input and output headers
if args.header: