if len(raw_signal) == 0:
raise ValueError("Failed in extracting " + (
os.path.join(raw_folder, os.path.splitext(file_n)[0] + ".signal")))
except:
// logging.getLogger(__name__).error("Cannot extact file %s", file_n, exc_info=True)
continue
with open(os.path.join(raw_folder, os.path.splitext(file_n)[0] + ".signal"), "w+") as signal_file:
After Change
os.makedirs(FLAGS.output_dir)
raw_folder = os.path.abspath(os.path.join(out_folder, "raw"))
ref_folder = os.path.abspath(os.path.join(out_folder, "reference"))
log_folder = os.path.abspath(os.path.join(out_folder, "log"))
if not os.path.isdir(raw_folder):
os.mkdir(raw_folder)
if not os.path.isdir(ref_folder):
os.mkdir(ref_folder)
if not os.path.isdir(log_folder):
os.mkdir(log_folder)
logging.basicConfig(filename=os.path.join(log_folder,"extract.log"),
level=logging.DEBUG,