Skip to content

Commit

Permalink
Merge pull request #399 from google/gbg/hotfix-002
Browse files Browse the repository at this point in the history
fix uninitialized variable
  • Loading branch information
barbibulle committed Jan 17, 2024
2 parents bb02551 + 54f2981 commit 37afda3
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 37afda3

Please sign in to comment.