Skip to content

Commit

Permalink
generic entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-ld committed Mar 23, 2021
1 parent 6114a8c commit 2bbca28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
python_requires=">=3.6",
entry_points={
"console_scripts": [
"smart_tv_telegram=smart_tv_telegram.__main__:arg_parser",
"smart_tv_telegram=smart_tv_telegram.__main__:entry_point",
],
},
include_package_data=True
Expand Down
6 changes: 5 additions & 1 deletion smart_tv_telegram/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def arg_parser(devices: DeviceFinderCollection):
main(args.config, devices)


if __name__ == "__main__":
def entry_point():
_devices = DeviceFinderCollection()
_devices.register_finder(UpnpDeviceFinder())
_devices.register_finder(ChromecastDeviceFinder())
Expand All @@ -73,3 +73,7 @@ def arg_parser(devices: DeviceFinderCollection):
_devices.register_finder(XbmcDeviceFinder())

arg_parser(_devices)


if __name__ == "__main__":
entry_point()

0 comments on commit 2bbca28

Please sign in to comment.