Skip to content

Commit 85ace09

Browse files
unused code removal
1 parent 2a6b82e commit 85ace09

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

crmsh/bootstrap.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@
2626

2727
import yaml
2828
import socket
29-
from tempfile import mktemp
3029
from string import Template
3130
from lxml import etree
3231

33-
import crmsh.parallax
3432
from . import config, constants
3533
from . import utils
3634
from . import xmlutil
37-
from .cibconfig import mkset_obj, cib_factory
35+
from .cibconfig import cib_factory
3836
from . import corosync
3937
from . import tmpfiles
4038
from . import lock

crmsh/utils.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -775,21 +775,6 @@ def str2file(s, fname, mod=0o644):
775775
return False
776776
return True
777777

778-
def write_remote_file(text, tofile, user, remote):
779-
shell_script = f'''cat >> {tofile} << EOF
780-
{text}
781-
EOF
782-
'''
783-
result = subprocess_run_auto_ssh_no_input(
784-
shell_script,
785-
remote,
786-
user,
787-
stdout=subprocess.DEVNULL,
788-
stderr=subprocess.PIPE,
789-
)
790-
if result.returncode != 0:
791-
raise ValueError("Failed to write to {}@{}/{}: {}".format(user, remote, tofile, result.stdout.decode('utf-8')))
792-
793778
def copy_remote_textfile(remote_user, remote_node, remote_text_file, local_path):
794779
"""
795780
scp might lack permissions to copy the file for a non-root user.

0 commit comments

Comments
 (0)