Skip to content

Commit a9eac4a

Browse files
committed
define __str__ avoid call to super()
1 parent 67ed415 commit a9eac4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

metomi/rose/loc_handlers/rsync.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ def __init__(self, dict_, cmd=None):
5858

5959
if self.returncode == 255:
6060
host = dict_['args'][dict_['args'].index('-n') + 1]
61-
self.message = (
61+
self.mod_msg = (
6262
self.BASE_MESSAGE
6363
+ 'If it is then host'
6464
f' "{host}"'
6565
' is uncontactable (ssh 255 error).'
6666
)
6767
else:
68-
self.message = (
68+
self.mod_msg = (
6969
self.BASE_MESSAGE
7070
+ f'`{self.cmd}` failed with:'
7171
+ indent(
@@ -75,7 +75,9 @@ def __init__(self, dict_, cmd=None):
7575
prefix=' ',
7676
)
7777
)
78-
super().__init__(self.message)
78+
79+
def __str__(self):
80+
return self.mod_msg
7981

8082

8183
class RsyncLocHandler:

0 commit comments

Comments
 (0)