diff --git a/testgres/operations/remote_ops.py b/testgres/operations/remote_ops.py index fb5dd4b2..128a2a21 100644 --- a/testgres/operations/remote_ops.py +++ b/testgres/operations/remote_ops.py @@ -347,7 +347,7 @@ def read_binary(self, filename, start_pos): assert type(start_pos) == int # noqa: E721 assert start_pos >= 0 - cmd = "tail -c +{} {}".format(start_pos + 1, __class__._escape_path(filename)) + cmd = ["tail", "-c", "+{}".format(start_pos + 1), filename] r = self.exec_command(cmd) assert type(r) == bytes # noqa: E721 return r @@ -367,7 +367,7 @@ def get_file_size(self, filename): assert filename is not None assert type(filename) == str # noqa: E721 - cmd = "du -b " + __class__._escape_path(filename) + cmd = ["du", "-b", filename] s = self.exec_command(cmd, encoding=get_default_encoding()) assert type(s) == str # noqa: E721 @@ -462,15 +462,6 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432): ) return conn - def _escape_path(path): - assert type(path) == str # noqa: E721 - assert path != "" # Ok? - - r = "'" - r += path - r += "'" - return r - def normalize_error(error): if isinstance(error, bytes):
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: