From 54f29812676ea6bc7033cc5e29341d2575f8d7e4 Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Tue, 16 Jan 2024 16:49:06 -0800 Subject: [PATCH] fix uninitialized variable --- bumble/transport/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bumble/transport/__init__.py b/bumble/transport/__init__.py index 5b9e0168..6a9a6b53 100644 --- a/bumble/transport/__init__.py +++ b/bumble/transport/__init__.py @@ -82,14 +82,13 @@ async def open_transport(name: str) -> Transport: scheme, *tail = name.split(':', 1) spec = tail[0] if tail else None + metadata = None if spec: # Metadata may precede the spec if spec.startswith('['): metadata_str, *tail = spec[1:].split(']') spec = tail[0] if tail else None metadata = dict([entry.split('=') for entry in metadata_str.split(',')]) - else: - metadata = None transport = await _open_transport(scheme, spec) if metadata: