Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos
Commits
325bbd98
Commit
325bbd98
authored
Nov 16, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add timeout on ssh rdiff-backup promise.
parent
1505c512
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
slapos/recipe/rdiffbackup.py
slapos/recipe/rdiffbackup.py
+5
-0
No files found.
slapos/recipe/rdiffbackup.py
View file @
325bbd98
...
@@ -30,6 +30,7 @@ from urlparse import urlparse
...
@@ -30,6 +30,7 @@ from urlparse import urlparse
import
os
import
os
import
subprocess
import
subprocess
import
sys
import
sys
import
time
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.dropbear
import
KnownHostsFile
from
slapos.recipe.dropbear
import
KnownHostsFile
...
@@ -53,6 +54,10 @@ def promise(args):
...
@@ -53,6 +54,10 @@ def promise(args):
ssh
.
stdin
.
flush
()
ssh
.
stdin
.
flush
()
ssh
.
stdin
.
close
()
ssh
.
stdin
.
close
()
time
.
sleep
(
2
)
if
ssh
.
poll
()
is
None
:
ssh
.
kill
()
if
ssh
.
wait
()
!=
0
:
if
ssh
.
wait
()
!=
0
:
# Bad python 2 syntax, looking forward python 3 to have print(file=)
# Bad python 2 syntax, looking forward python 3 to have print(file=)
print
>>
sys
.
stderr
,
"SSH Connection failed"
print
>>
sys
.
stderr
,
"SSH Connection failed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment