We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7dc8b17 commit 3db6a62Copy full SHA for 3db6a62
bluetooth_battery.py
@@ -148,7 +148,7 @@ def _perform_query(self) -> int:
148
return result
149
150
151
-if __name__ == "__main__":
+def main():
152
"""
153
The starting point of the program. For each device address in the argument
154
list a bluetooth socket will be opened and the battery level will be read
@@ -161,3 +161,6 @@ def _perform_query(self) -> int:
161
for device in args.devices:
162
query = BatteryStateQuerier(*device.split("."))
163
print("Battery level for {} is {}".format(device, str(query)))
164
+
165
+if __name__ == "__main__":
166
+ main()
0 commit comments