diff --git a/confluent_client/confluent/asynclient.py b/confluent_client/confluent/asynclient.py index 79b4308f..1064a2aa 100644 --- a/confluent_client/confluent/asynclient.py +++ b/confluent_client/confluent/asynclient.py @@ -347,12 +347,12 @@ class Command(object): else: ikey = key if input is None: - for res in await self.read('/nodegroups/{0}/{1}'.format( + async for res in self.read('/nodegroups/{0}/{1}'.format( noderange, resource)): rc = self.handle_results(ikey, rc, res) else: kwargs[ikey] = input - for res in await self.update('/nodegroups/{0}/{1}'.format( + async for res in self.update('/nodegroups/{0}/{1}'.format( noderange, resource), kwargs): rc = self.handle_results(ikey, rc, res) return rc @@ -667,10 +667,10 @@ def show_attr(attr, requestargs, seenattributes, options, node): return processattr -def printgroupattributes(session, requestargs, showtype, nodetype, noderange, options): +async def printgroupattributes(session, requestargs, showtype, nodetype, noderange, options): exitcode = 0 seenattributes = set([]) - for res in session.read('/{0}/{1}/attributes/{2}'.format(nodetype, noderange, showtype)): + async for res in session.read('/{0}/{1}/attributes/{2}'.format(nodetype, noderange, showtype)): if 'error' in res: sys.stderr.write(res['error'] + '\n') exitcode = 1