Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jean-Paul Smets
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
Hide 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
import
os
import
subprocess
import
sys
import
time
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.dropbear
import
KnownHostsFile
...
...
@@ -53,6 +54,10 @@ def promise(args):
ssh
.
stdin
.
flush
()
ssh
.
stdin
.
close
()
time
.
sleep
(
2
)
if
ssh
.
poll
()
is
None
:
ssh
.
kill
()
if
ssh
.
wait
()
!=
0
:
# Bad python 2 syntax, looking forward python 3 to have print(file=)
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