Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bender committed Jan 10, 2025
1 parent d0709a9 commit 0211fa7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions synapse/tests/test_tools_aha.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ async def test_aha_mirror(self):
self.eq(retn, 1)
outp.expect(f'Service at {ahaurl} does not support the required callpeers feature.')

with mock.patch('synapse.telepath.Proxy._hasTeleFeat',
side_effect=s_exc.NoSuchMeth(name='_hasTeleFeat')):
argv = ['--url', ahaurl]
retn, outp = await self.execToolMain(s_a_mirror.main, argv)
self.eq(retn, 1)
outp.expect(f'Service at {ahaurl} does not support the required callpeers feature.')

argv = ['--url', 'tcp://newp:1234/']
retn, outp = await self.execToolMain(s_a_mirror.main, argv)
self.eq(retn, 1)
Expand Down
5 changes: 2 additions & 3 deletions synapse/tools/aha/mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ async def main(argv, outp=s_output.stdout):
if not prox._hasTeleFeat('callpeers', vers=1):
outp.printf(f'Service at {opts.url} does not support the required callpeers feature.')
return 1
except s_exc.BadVersion as e:
valu = s_version.fmtVersion(*e.get('valu'))
outp.printf(f'Proxy version {valu} is outside of the aha supported range ({reqver}).')
except s_exc.NoSuchMeth:
outp.printf(f'Service at {opts.url} does not support the required callpeers feature.')
return 1
classes = prox._getClasses()
if 'synapse.lib.aha.AhaApi' not in classes:
Expand Down

0 comments on commit 0211fa7

Please sign in to comment.