Selaa lähdekoodia

solve sshQuit argument

alpha
Jeong Geol Kim 4 vuotta sitten
vanhempi
commit
4c89c5fd6f
1 muutettua tiedostoa jossa 8 lisäystä ja 7 poistoa
  1. 8
    7
      main.py

+ 8
- 7
main.py Näytä tiedosto

@@ -34,8 +34,7 @@ def sshConnect(cs, sd):
34 34
     data_root_dir = './data/'+cs+sd
35 35
     stdin, stdout, stderr = ssh.exec_command('mkdir ' + data_root_dir)
36 36
     #TODO: 여기에 도커 명령어 및 동시 녹화 코드 입력
37
-    stdin, stdout, stderr = ssh.exec_command('docker run --rm --name mail_recorder --gpus 1 --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+cs+sd+':/data/'+cs+sd+' stereolabs/zed:3.5-gl-devel-cuda11.0-ubuntu18.04 python3 /sources/recorder.py')
38
-    
37
+    stdin, stdout, stderr = ssh.exec_command('docker run --rm --name mail_recorder --gpus 1 --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+cs+sd+':/data/'+cs+sd+' stereolabs/zed:3.5-gl-devel-cuda11.1-ubuntu18.04 python3 /sources/recorder.py')
39 38
     print(stdout.readlines())
40 39
 
41 40
 def sshQuit(cs, sd):
@@ -84,21 +83,23 @@ def askInformation(customer_code,surgery_date):
84 83
                 label_recording = tkinter.Label(window, text='MAIL system에 수술을 기록 중입니다.\n기록 중단을 원할 시 \n기록 종료 버튼을 눌러주세요.')
85 84
                 label_recording.pack()
86 85
         
87
-def askQuit(customer):
86
+def askQuit(cn, sd):
87
+    customer_number = cn
88
+    surgery_date = sd
88 89
     msg_box = messagebox.askquestion("기록 중지 확인", '기록을 중지하시겠습니까?')
89 90
     if msg_box == 'yes':
90 91
         #TODO: docker 중지 명령어 보내기
91
-        sshQuit()
92
+        sshQuit(customer_number, surgery_date)
92 93
         window.destroy()
93 94
 
94 95
 
95 96
 
96 97
 def buttonAction(event):    
97
-    if button_confirm['text'] == '입력완료':
98
-        customer_code = str(entry_customer_code.get())        
98
+    customer_code = str(entry_customer_code.get())        
99
+    if button_confirm['text'] == '입력완료':        
99 100
         askInformation(customer_code, surgery_date)
100 101
     else:
101
-        askQuit(customer_code, surgery_date)
102
+        askQuit(customer_code,surgery_date)
102 103
 # def fillSurgeryDate():
103 104
 
104 105
 

Loading…
Peruuta
Tallenna