1. Jing Wang
  2. SADIT

Commits

Jing Conan Wang  committed ffc9d0e

BugFix, when there is no SVM_FOLDER envionrment variable, raise a exception.

  • Participants
  • Parent commits 59a22cc
  • Branches default

Comments (0)

Files changed (1)

File Detector/SVMDetector.py

View file
  • Ignore whitespace
 """
 from __future__ import print_function, division, absolute_import
 import os
-SVM_FOLDER = os.environ['SVM_FOLDER']
+SVM_FOLDER = os.environ.get('SVM_FOLDER')
 
 import subprocess
 import argparse
         self.desc = desc
         self.record_data = dict()
 
+        if SVM_FOLDER is None:
+            raise Exception("You must specify SVM_FOLDER environment variable"
+                            "before using SVM Detector")
+
     @property
     def rg_type(self): return self.desc['win_type']