Skip to content

Commit

Permalink
Fix minor issues on the TV grabber TVMmaze
Browse files Browse the repository at this point in the history
Syntax warnig during installation:
/tvmaze/utils.py:45: SyntaxWarning: "is not" with a literal. Did you mean "!="?

Create correct path to the cache file:
Use 'cachedir' to create the cahe folder, if it does not exits.

(cherry picked from commit 116a715)
  • Loading branch information
rcrdnalor committed Feb 25, 2021
1 parent 525e3b0 commit b6ddf20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/bindings/python/tvmaze/utils.py
Expand Up @@ -42,7 +42,7 @@ def get_data(self):


def strip_tags(html):
if html is not None and html is not "":
if html is not None and html != "":
s = MLStripper()
s.feed(html)
return s.get_data()
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/scripts/metadata/Television/tvmaze.py
Expand Up @@ -501,7 +501,7 @@ def main():
confdir = os.path.join(confdir, '.mythtv')
cachedir = os.path.join(confdir, 'cache')
if not os.path.exists(cachedir):
os.makedirs(cachepath)
os.makedirs(cachedir)
if sys.version_info[0] == 2:
cache_name = os.path.join(cachedir, 'py2tvmaze')
else:
Expand Down

0 comments on commit b6ddf20

Please sign in to comment.