浏览代码

change location of creating log file

master
Jeong Geol Kim 4 年前
父节点
当前提交
f10b4c9051
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9
    5
      recorder.py

+ 9
- 5
recorder.py 查看文件

@@ -29,8 +29,15 @@ target_dir = str(root_path) + str(recent_file[0])
29 29
 
30 30
 def handler(signal, frame):
31 31
     global stop_signal
32
-    global zed_list        
32
+    global zed_list
33
+    global target_dir        
33 34
     stop_signal = True
35
+
36
+    filepath = '%s/log.txt'%(target_dir)
37
+    f = open(filepath, 'w')
38
+    f.write('record succesfully stopped')
39
+    f.close()
40
+    
34 41
     time.sleep(2)
35 42
     exit()
36 43
 
@@ -63,10 +70,7 @@ def grab_run(index, cameras):
63 70
 
64 71
     zed_list[index].disable_recording()
65 72
     
66
-    filepath = '%s/log.txt'%(target_dir)
67
-    f = open(filepath, 'w')
68
-    f.write('record succesfully stopped')
69
-    f.close()
73
+    
70 74
     #print('saved')    
71 75
 
72 76
 def main():

正在加载...
取消
保存