2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-06-02 09:19:39 +00:00

Replace eventlet CalledProcessError workaround with proper catch

The repr() check existed because eventlet broke normal exception
catching. With eventlet removed, catch CalledProcessError directly.
This commit is contained in:
Vinícius Ferrão
2026-05-03 01:45:43 -03:00
parent 0b1c40aa4a
commit 52f2086319
+2 -5
View File
@@ -17,6 +17,7 @@
import asyncio
import glob
import os
import subprocess
import shutil
import tempfile
import confluent.sshutil as sshutil
@@ -197,11 +198,7 @@ async def sync_list_to_node(sl, node, suffixes, peerip=None):
targip = peerip
output, stderr = await util.check_output(
'rsync', '-rvLD', targdir + '/', 'root@[{}]:/'.format(targip))
except Exception as e:
if 'CalledProcessError' not in repr(e):
# CalledProcessError can't be caught normally through
# asyncio subprocess, so check via repr as a workaround
raise
except subprocess.CalledProcessError:
unreadablefiles = []
for root, dirnames, filenames in os.walk(targdir):
for filename in filenames: