From d42b864ecc254d0f5ff30ad0cad42ff1ac2d67b5 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 31 May 2014 12:58:43 -0700 Subject: [PATCH] Fix for UnboundLocalError: local variable 'rating_text' referenced before assignment --- sickbeard/metadata/mediabrowser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sickbeard/metadata/mediabrowser.py b/sickbeard/metadata/mediabrowser.py index cb441b17..caeb3f3b 100644 --- a/sickbeard/metadata/mediabrowser.py +++ b/sickbeard/metadata/mediabrowser.py @@ -479,9 +479,7 @@ class MediaBrowserMetadata(generic.GenericMetadata): if not ep_obj.relatedEps: Rating = etree.SubElement(episode, "Rating") if getattr(myEp, 'rating', None) is not None: - rating_text = myEp['rating'] - if rating_text != None: - Rating.text = rating_text + Rating.text = myEp['rating'] IMDB_ID = etree.SubElement(episode, "IMDB_ID") IMDB = etree.SubElement(episode, "IMDB")