Skip to content

Commit

Permalink
Merge pull request #18 from MoonVision/master
Browse files Browse the repository at this point in the history
Fix debug log/print with tuples
  • Loading branch information
dbrattli committed Nov 9, 2020
2 parents 3c40b2d + f5f150a commit 1140d2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion aioreactive/operators/from_iterable.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def worker() -> None:
log.debug("sync_worker()")
for value in self.iterable:
try:
log.debug("sync_worker. asending: %s" % str(value))
log.debug("sync_worker. asending: %s", value)
await observer.asend(value)
except Exception as ex:
await observer.athrow(ex)
Expand Down
2 changes: 1 addition & 1 deletion aioreactive/operators/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def cancel(self, sub=None) -> None:
self._inner_subs = {}

async def asend_core(self, stream: AsyncObservable) -> None:
log.debug("Merge.Sink:asend_core(%s)" % stream)
log.debug("Merge.Sink:asend_core(%s)", stream)

inner_stream = Merge.Sink.InnerStream()
inner_sub = await chain(inner_stream, self._observer) # type: AsyncDisposable
Expand Down
2 changes: 1 addition & 1 deletion aioreactive/operators/switch_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def done(self, sub=None) -> None:
self.latest = 0

async def asend(self, stream) -> None:
log.debug("SwitchLatest._:send(%s)" % stream)
log.debug("SwitchLatest._:send(%s)", stream)
inner_observer = await chain(SwitchLatest.Sink.Inner(self), self._observer)

self._latest = id(inner_observer)
Expand Down
2 changes: 1 addition & 1 deletion aioreactive/testing/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, send=anoop, throw=anoop, close=anoop):
self._close = close

async def asend_core(self, value: T):
print("AsyncAnonymousObserver:asend_core(%s)" % value)
print("AsyncAnonymousObserver:asend_core(%s)" % (value,))
time = self._loop.time()
self._values.append((time, value))

Expand Down

0 comments on commit 1140d2d

Please sign in to comment.