From 63794981b751d595e72e8e609caf23a4cee26ada Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Tue, 2 May 2023 11:15:07 -0700 Subject: [PATCH] fix format --- bumble/transport/android_netsim.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bumble/transport/android_netsim.py b/bumble/transport/android_netsim.py index 7172081..41c390f 100644 --- a/bumble/transport/android_netsim.py +++ b/bumble/transport/android_netsim.py @@ -75,7 +75,7 @@ def get_ini_dir() -> Optional[pathlib.Path]: # ----------------------------------------------------------------------------- def find_grpc_port() -> int: - if not (ini_dir:= get_ini_dir()): + if not (ini_dir := get_ini_dir()): logger.debug('no known directory for .ini file') return 0 @@ -96,7 +96,7 @@ def find_grpc_port() -> int: # ----------------------------------------------------------------------------- def publish_grpc_port(grpc_port) -> bool: - if not (ini_dir:= get_ini_dir()): + if not (ini_dir := get_ini_dir()): logger.debug('no known directory for .ini file') return False @@ -108,6 +108,7 @@ def publish_grpc_port(grpc_port) -> bool: try: ini_file.write_text(f'grpc.port={grpc_port}\n') logger.debug(f"published gRPC port at {ini_file}") + def cleanup(): logger.debug("removing .ini file") ini_file.unlink()