cfangmeier / tuijam

A fancy TUI client for Google Play Music
MIT License
129 stars 9 forks source link

Unsafe load() call disabled by Gentoo. See bug #659348 #24

Closed guitmz closed 5 years ago

guitmz commented 5 years ago

I have installed tuijam just now in my Gentoo system and upon the first run I got the error message. Full error:

λ ~/ tuijam
starting up.
logging in.
Traceback (most recent call last):
  File "/home/guitmz/.local/bin/tuijam", line 1363, in <module>
    app = main(debug=debug)
  File "/home/guitmz/.local/bin/tuijam", line 1328, in main
    if not app.login():
  File "/home/guitmz/.local/bin/tuijam", line 692, in login
    credentials = self.read_config()
  File "/home/guitmz/.local/bin/tuijam", line 706, in read_config
    config = yaml.load(f.read())
  File "/usr/lib64/python3.6/site-packages/yaml/__init__.py", line 109, in load
    raise RuntimeError("Unsafe load() call disabled by Gentoo. See bug #659348")
RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348

Relevant Gentoo bug report https://bugs.gentoo.org/659348

It looks trivial to fix this issue (but I haven't really tried yet). Replacing yaml.load() calls with yaml.safe_load() should do it. Let me know your thoughts on this one.

Thanks

guitmz commented 5 years ago

I also recommend replacing yaml.dump() with yaml.safe_dump()