Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
23828f1c
Commit
23828f1c
authored
16 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Convert ssh.py to use the logging module
Reviewed-by: imsnah
parent
58b311ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ssh.py
+5
-6
5 additions, 6 deletions
lib/ssh.py
with
5 additions
and
6 deletions
lib/ssh.py
+
5
−
6
View file @
23828f1c
...
...
@@ -26,7 +26,6 @@
import
os
from
ganeti
import
logger
from
ganeti
import
utils
from
ganeti
import
errors
from
ganeti
import
constants
...
...
@@ -161,11 +160,11 @@ class SshRunner:
"""
if
not
os
.
path
.
isabs
(
filename
):
logg
er
.
E
rror
(
"
f
ile %s must be an absolute path
"
%
(
filename
)
)
logg
ing
.
e
rror
(
"
F
ile %s must be an absolute path
"
,
filename
)
return
False
if
not
os
.
path
.
isfile
(
filename
):
logg
er
.
E
rror
(
"
f
ile %s does not exist
"
%
(
filename
)
)
logg
ing
.
e
rror
(
"
F
ile %s does not exist
"
,
filename
)
return
False
command
=
[
constants
.
SCP
,
"
-q
"
,
"
-p
"
]
...
...
@@ -176,9 +175,9 @@ class SshRunner:
result
=
utils
.
RunCmd
(
command
)
if
result
.
failed
:
logg
er
.
E
rror
(
"
c
opy to node %s failed (%s) error %s,
"
"
command was %s
"
%
(
node
,
result
.
fail_reason
,
result
.
output
,
result
.
cmd
)
)
logg
ing
.
e
rror
(
"
C
opy to node %s failed (%s) error %s,
"
"
command was %s
"
,
node
,
result
.
fail_reason
,
result
.
output
,
result
.
cmd
)
return
not
result
.
failed
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment