Skip to content

Commit

Permalink
Merge pull request #462 from uruun/remove_deprecated_robotframework_apis
Browse files Browse the repository at this point in the history
remove deprecated robot utils usage
  • Loading branch information
Noordsestern authored Sep 2, 2024
2 parents 885c504 + c492422 commit eace10a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SSHLibrary/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from .config import (Configuration, IntegerEntry, NewlineEntry, StringEntry,
TimeEntry)
from robot.api import logger
from robot.utils import is_bytes, is_string, is_unicode, is_truthy, unicode, is_list_like
from robot.utils import is_bytes, is_string, is_truthy, is_list_like
from .pythonforward import LocalPortForwarding

try:
Expand Down Expand Up @@ -234,7 +234,7 @@ def _encode(self, text):
if is_bytes(text):
return text
if not is_string(text):
text = unicode(text)
text = str(text)
return text.encode(self.config.encoding, self.config.encoding_errors)

def _decode(self, bytes):
Expand Down Expand Up @@ -1459,7 +1459,7 @@ def _isabs(path):
return destination.rsplit(path_separator, 1)

def _create_missing_remote_path(self, path, mode):
if is_unicode(path):
if is_string(path):
path = path.encode(self._encoding)
if path.startswith(b'/'):
current_dir = b'/'
Expand Down

0 comments on commit eace10a

Please sign in to comment.