ソースを参照

debugging

master
Jeong Geol Kim 4年前
コミット
533ae32e46
1個のファイルの変更5行の追加2行の削除
  1. 5
    2
      auto_extract.py

+ 5
- 2
auto_extract.py ファイルの表示

@@ -74,8 +74,11 @@ def main():
74 74
                     transport.connect(username='mc365', password='tkadbrdhMC1!')
75 75
                     sftp = paramiko.SFTPClient.from_transport(transport)
76 76
                     #FIXME: send file recursively
77
-                    for file in file_list:
78
-                        sftp.put(file,'/data/'+str(file[5:]))
77
+                    full_list = glob.glob(id + "/*")
78
+                    for f in full_list:
79
+                        print(f)
80
+                        print(f[5:])
81
+                        sftp.put(f,'/data/'+str(f[5:]))
79 82
                     sftp.close()
80 83
                     transport.close()      
81 84
                     os.system('rm -rf '+id)     

読み込み中…
キャンセル
保存