Skip to content

Commit

Permalink
We need a main function for pypi :|
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWeirdDev committed Nov 13, 2021
1 parent 7dc8b17 commit 3db6a62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bluetooth_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _perform_query(self) -> int:
return result


if __name__ == "__main__":
def main():
"""
The starting point of the program. For each device address in the argument
list a bluetooth socket will be opened and the battery level will be read
Expand All @@ -161,3 +161,6 @@ def _perform_query(self) -> int:
for device in args.devices:
query = BatteryStateQuerier(*device.split("."))
print("Battery level for {} is {}".format(device, str(query)))

if __name__ == "__main__":
main()

0 comments on commit 3db6a62

Please sign in to comment.