|
@@ -1,4 +1,6 @@
|
|
#!/usr/bin/env python3
|
|
#!/usr/bin/env python3
|
|
|
|
+from os.path import join, expanduser
|
|
|
|
+
|
|
import urwid
|
|
import urwid
|
|
import gmusicapi
|
|
import gmusicapi
|
|
import logging
|
|
import logging
|
|
@@ -393,7 +395,6 @@ class App(urwid.Pile):
|
|
self.history = []
|
|
self.history = []
|
|
|
|
|
|
def read_config(self):
|
|
def read_config(self):
|
|
- from os.path import join, expanduser
|
|
|
|
import yaml
|
|
import yaml
|
|
config_file = join(expanduser('~'), '.config', 'tuijam', 'config.yaml')
|
|
config_file = join(expanduser('~'), '.config', 'tuijam', 'config.yaml')
|
|
with open(config_file) as f:
|
|
with open(config_file) as f:
|
|
@@ -569,7 +570,8 @@ class App(urwid.Pile):
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
- logging.basicConfig(filename='tuijam.log', level=logging.ERROR)
|
|
|
|
|
|
+ log_file = join(expanduser('~'), '.config', 'tuijam', 'log.txt')
|
|
|
|
+ logging.basicConfig(filename=log_file, level=logging.ERROR)
|
|
app = App()
|
|
app = App()
|
|
|
|
|
|
import signal
|
|
import signal
|
|
@@ -584,5 +586,5 @@ if __name__ == '__main__':
|
|
loop.run()
|
|
loop.run()
|
|
except Exception as e:
|
|
except Exception as e:
|
|
logging.exception(e)
|
|
logging.exception(e)
|
|
- print("Something bad happened! :( see tuijam.log for more information.")
|
|
|
|
|
|
+ print("Something bad happened! :( see log file ($HOME/.config/tuijam/) for more information.")
|
|
app.cleanup()
|
|
app.cleanup()
|