Revision 23828f1c lib/ssh.py
b/lib/ssh.py | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import os |
28 | 28 |
|
29 |
from ganeti import logger |
|
30 | 29 |
from ganeti import utils |
31 | 30 |
from ganeti import errors |
32 | 31 |
from ganeti import constants |
... | ... | |
161 | 160 |
|
162 | 161 |
""" |
163 | 162 |
if not os.path.isabs(filename): |
164 |
logger.Error("file %s must be an absolute path" % (filename))
|
|
163 |
logging.error("File %s must be an absolute path", filename)
|
|
165 | 164 |
return False |
166 | 165 |
|
167 | 166 |
if not os.path.isfile(filename): |
168 |
logger.Error("file %s does not exist" % (filename))
|
|
167 |
logging.error("File %s does not exist", filename)
|
|
169 | 168 |
return False |
170 | 169 |
|
171 | 170 |
command = [constants.SCP, "-q", "-p"] |
... | ... | |
176 | 175 |
result = utils.RunCmd(command) |
177 | 176 |
|
178 | 177 |
if result.failed: |
179 |
logger.Error("copy to node %s failed (%s) error %s,"
|
|
180 |
" command was %s" %
|
|
181 |
(node, result.fail_reason, result.output, result.cmd))
|
|
178 |
logging.error("Copy to node %s failed (%s) error %s,"
|
|
179 |
" command was %s",
|
|
180 |
node, result.fail_reason, result.output, result.cmd)
|
|
182 | 181 |
|
183 | 182 |
return not result.failed |
184 | 183 |
|
Also available in: Unified diff