Skip to content

Commit

Permalink
fix uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Jan 17, 2024
1 parent bb02551 commit 54f2981
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bumble/transport/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 54f2981

Please sign in to comment.