Skip to content

Commit 6652fe9

Browse files
authored
Merge pull request #3698 from ktbyers/fix_space_available_scp
Fix space available scp
2 parents d0f127a + dc0ab03 commit 6652fe9

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

netmiko/arista/arista.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
122122
class AristaFileTransfer(CiscoFileTransfer):
123123
"""Arista SCP File Transfer driver."""
124124

125+
prompt_pattern = r"[$>#]"
126+
125127
def __init__(
126128
self,
127129
ssh_conn: "BaseConnection",
@@ -142,6 +144,7 @@ def __init__(
142144

143145
def remote_space_available(self, search_pattern: str = "") -> int:
144146
"""Return space available on remote device."""
147+
search_pattern = self.prompt_pattern
145148
return self._remote_space_available_unix(search_pattern=search_pattern)
146149

147150
def check_file_exists(self, remote_cmd: str = "") -> bool:

netmiko/juniper/juniper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ def __init__(
287287

288288
def remote_space_available(self, search_pattern: str = "") -> int:
289289
"""Return space available on remote device."""
290+
search_pattern = r"[%>$#]"
290291
return self._remote_space_available_unix(search_pattern=search_pattern)
291292

292293
def check_file_exists(self, remote_cmd: str = "") -> bool:

netmiko/ubiquiti/edgerouter_ssh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def check_file_exists(self, remote_cmd: str = "") -> bool:
6666

6767
def remote_space_available(self, search_pattern: str = "") -> int:
6868
"""Return space available on remote device."""
69+
search_pattern = r"[\$#]"
6970
return self._remote_space_available_unix(search_pattern=search_pattern)
7071

7172
def remote_md5(

0 commit comments

Comments
 (0)