فهرست منبع

Fixed bug in removing output file.

Tom Flucke 6 سال پیش
والد
کامیت
05f82d2c6a
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/feature-extractor/extractor.py

+ 2 - 1
src/feature-extractor/extractor.py

@@ -85,7 +85,8 @@ def main():
     import numpy as np
     if len(np.unique([s.user for s in out])) < args.min_users:
         print("Not enough data to build valid dataset.", file=sys.stderr)
-        os.remove(args.outfile.name)
+        if os.path.isfile(args.outfile.name):
+            os.remove(args.outfile.name)
         return
     try:
         import cPickle as pickle