Skip to content

Commit

Permalink
Fixed an edge case in name converter with an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Jan 28, 2021
1 parent 1f02908 commit db697c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdbus/dbus_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ async def request_default_bus_name_async(
def _method_name_converter(python_name: str) -> Iterator[str]:
char_iter = iter(python_name)
# Name starting with upper case letter
first_char = next(char_iter)
try:
first_char = next(char_iter)
except StopIteration:
return

yield first_char.upper()

upper_next_one = False
Expand Down

0 comments on commit db697c9

Please sign in to comment.