Skip to content

Commit 3db6a62

Browse files
authored
We need a main function for pypi :|
1 parent 7dc8b17 commit 3db6a62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bluetooth_battery.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _perform_query(self) -> int:
148148
return result
149149

150150

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

0 commit comments

Comments
 (0)