aboutsummaryrefslogtreecommitdiff
path: root/roku-cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'roku-cli.py')
-rwxr-xr-xroku-cli.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/roku-cli.py b/roku-cli.py
index e41574d..5312631 100755
--- a/roku-cli.py
+++ b/roku-cli.py
@@ -159,7 +159,7 @@ def remote_loop(stdscr, remote):
elif c == 'q':
break
-def main(stdscr, ip):
+def main(stdscr, config):
init_curses()
stdscr.clear()
@@ -207,9 +207,12 @@ def init_run(config_file):
with open(str(config_file), 'w') as cf:
config.write(cf)
-if __name__ == '__main__':
+def startup():
config_file = Path('~/.config/roku/roku.config').expanduser()
if not config_file.exists():
init_run(config_file)
config = RokuConfig(config_file)
curses.wrapper(main, config)
+
+if __name__ == '__main__':
+ startup()