File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,15 +39,20 @@ def daca2report(reportfolder):
3939def upload (localfolder , webfolder ):
4040 if len (PASSWORD ) < 3 :
4141 return
42- try :
43- child = pexpect .spawn (
44- 'scp -r ' + localfolder + ' danielmarjamaki,cppcheck@web.sf.net:htdocs/' + webfolder )
45- # child.expect('upload@trac.cppcheck.net\'s password:')
46- child .expect ('Password:' )
47- child .sendline (PASSWORD )
48- child .interact ()
49- except (IOError , OSError , pexpect .TIMEOUT ):
50- pass
42+ tries = 1
43+ while tries <= 5 :
44+ try :
45+ child = pexpect .spawn (
46+ 'scp -r ' + localfolder + ' danielmarjamaki,cppcheck@web.sf.net:htdocs/' + webfolder )
47+ # child.expect('upload@trac.cppcheck.net\'s password:')
48+ child .expect ('Password:' )
49+ child .sendline (PASSWORD )
50+ child .interact ()
51+ return
52+ except (IOError , OSError , pexpect .TIMEOUT , pexpect .EOF ):
53+ print ('Sleep for 10 seconds..' )
54+ time .sleep (10 )
55+ tries = tries + 1
5156
5257
5358def daca2 (foldernum ):
You can’t perform that action at this time.
0 commit comments