Skip to content

Commit 984d26f

Browse files
committed
remove debug prints
1 parent b42ada9 commit 984d26f

4 files changed

Lines changed: 0 additions & 38 deletions

File tree

tests/services/test_browser.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -631,25 +631,16 @@ def test_service_browser_listeners_update_service():
631631
class MyServiceListener(r.ServiceListener):
632632
def add_service(self, zc, type_, name) -> None:
633633
nonlocal callbacks
634-
import pprint
635-
636-
pprint.pprint(["mylisten", "add", type_, name])
637634
if name == registration_name:
638635
callbacks.append(("add", type_, name))
639636

640637
def remove_service(self, zc, type_, name) -> None:
641638
nonlocal callbacks
642-
import pprint
643-
644-
pprint.pprint(["mylisten", "remove", type_, name])
645639
if name == registration_name:
646640
callbacks.append(("remove", type_, name))
647641

648642
def update_service(self, zc, type_, name) -> None:
649643
nonlocal callbacks
650-
import pprint
651-
652-
pprint.pprint(["mylisten", "update", type_, name])
653644
if name == registration_name:
654645
callbacks.append(("update", type_, name))
655646

tests/test_aio.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,8 @@ def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None:
109109
calls.append(("update", type, name))
110110

111111
listener = MyListener()
112-
import pprint
113112

114-
pprint.pprint("here")
115113
aiozc.zeroconf.add_service_listener(type_, listener)
116-
pprint.pprint("done add_service_listener")
117114

118115
desc = {'path': '/~paulsm/'}
119116
info = ServiceInfo(

zeroconf/_core.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,9 @@ def async_notify_all(self) -> None:
358358

359359
async def _async_notify_all(self) -> None:
360360
"""Notify all async listeners."""
361-
import pprint
362-
363-
pprint.pprint("_async_notify_all running")
364361
assert self.async_condition is not None
365362
async with self.async_condition:
366363
self.async_condition.notify_all()
367-
pprint.pprint("_async_notify_all finished")
368364

369365
def get_service_info(self, type_: str, name: str, timeout: int = 3000) -> Optional[ServiceInfo]:
370366
"""Returns network's service information for a particular

zeroconf/_services/browser.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ def _enqueue_callback(
228228
) -> None:
229229
# Code to ensure we only do a single update message
230230
# Precedence is; Added, Remove, Update
231-
import pprint
232-
233-
pprint.pprint(["_enqueue_callback", state_change, type_, name])
234231
key = (name, type_)
235232
if (
236233
state_change is ServiceStateChange.Added
@@ -308,9 +305,6 @@ def async_update_records_complete(self) -> None:
308305
except KeyError:
309306
return
310307
self._handlers_to_call[name_type] = state_change
311-
import pprint
312-
313-
pprint.pprint(["handlers to call is now", self._handlers_to_call])
314308

315309
def cancel(self) -> None:
316310
"""Cancel the browser."""
@@ -365,11 +359,7 @@ async def async_browser_task(self) -> None:
365359
# between when we checked above when we were not
366360
# holding the condition
367361
if not self._handlers_to_call:
368-
import pprint
369-
370-
pprint.pprint(["Waiting until timeout", timeout])
371362
await wait_condition_or_timeout(self.zc.async_condition, timeout)
372-
pprint.pprint(["Done Waiting until timeout", timeout])
373363

374364
outs = self.generate_ready_queries()
375365
for out in outs:
@@ -379,9 +369,6 @@ async def async_browser_task(self) -> None:
379369
continue
380370

381371
(name_type, state_change) = self._handlers_to_call.popitem(False)
382-
import pprint
383-
384-
pprint.pprint(["incoming event", (name_type, state_change)])
385372
if self.queue:
386373
self.queue.put((name_type, state_change))
387374
continue
@@ -435,9 +422,6 @@ def __init__(
435422
asyncio.Task,
436423
asyncio.run_coroutine_threadsafe(self._async_browser_task(), self.zc.loop).result(),
437424
)
438-
import pprint
439-
440-
pprint.pprint("Finished startup")
441425

442426
async def _async_browser_task(self) -> asyncio.Task:
443427
return cast(asyncio.Task, asyncio.ensure_future(self.async_browser_task()))
@@ -458,13 +442,7 @@ def run(self) -> None:
458442
"""Run the browser thread."""
459443
assert self.queue is not None
460444
while True:
461-
import pprint
462-
463-
pprint.pprint(["browser thread wait for event on the queue"])
464445
event = self.queue.get()
465-
import pprint
466-
467-
pprint.pprint(["got event", event])
468446
if event is None:
469447
return
470448
name_type, state_change = event

0 commit comments

Comments
 (0)