diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-07 00:12:29 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2018-10-07 00:12:29 +0200 |
commit | 43d7ef057b4ae752a60b947e523b3a56782bf5cd (patch) | |
tree | 3ed6ef3ab505448facb0f7a4e94ea8c5202039cc | |
parent | f1a3e138fbbdd8e5b557b73e9559c11c78e7ff01 (diff) |
test_prepare_disks: use mkdir -p to create directories
Because sftp method barfed on existing paths.
-rwxr-xr-x | kpov_judge/test_prepare_disks.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kpov_judge/test_prepare_disks.py b/kpov_judge/test_prepare_disks.py index a03bb0c..7564d6d 100755 --- a/kpov_judge/test_prepare_disks.py +++ b/kpov_judge/test_prepare_disks.py @@ -84,8 +84,7 @@ class SSHGuestFs: def mv (self, src, dest): self.conn.exec_command('mv "{}" "{}"'.format(src, dest)) def mkdir (self, path): - sftp_client = self.conn.open_sftp() - sftp_client.mkdir(path) + self.conn.exec_command('mkdir -p "{}"'.format(path)) def read_file (self, path): sftp_client = self.conn.open_sftp() f = sftp_client.file(path, mode='r', bufsize=-1) |