Просмотр исходного кода

change location of creating log file

master
Jeong Geol Kim 4 лет назад
Родитель
Сommit
f10b4c9051
1 измененных файлов: 9 добавлений и 5 удалений
  1. 9
    5
      recorder.py

+ 9
- 5
recorder.py Просмотреть файл

29
 
29
 
30
 def handler(signal, frame):
30
 def handler(signal, frame):
31
     global stop_signal
31
     global stop_signal
32
-    global zed_list        
32
+    global zed_list
33
+    global target_dir        
33
     stop_signal = True
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
     time.sleep(2)
41
     time.sleep(2)
35
     exit()
42
     exit()
36
 
43
 
63
 
70
 
64
     zed_list[index].disable_recording()
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
     #print('saved')    
74
     #print('saved')    
71
 
75
 
72
 def main():
76
 def main():

Загрузка…
Отмена
Сохранить