aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-23 22:51:52 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-08-23 22:51:52 +0200
commit40ad490efe38a1f1c66e75b1a99b1956ff06736e (patch)
treea9c3cf796764e764aaff01726a709213e3b1ccd8
parent84a935a1d475dee021402e5fb74c645ea43709d0 (diff)
livestreamer.plugins.justintv: Small tweak to login check.
-rw-r--r--src/livestreamer/plugins/justintv.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/livestreamer/plugins/justintv.py b/src/livestreamer/plugins/justintv.py
index c3e7826..4aeca9b 100644
--- a/src/livestreamer/plugins/justintv.py
+++ b/src/livestreamer/plugins/justintv.py
@@ -57,7 +57,11 @@ class JustinTV(Plugin):
for node in element.childNodes:
if node.nodeType == node.TEXT_NODE:
res.append(node.data)
- return "".join(res)
+
+ if len(res) == 0:
+ return None
+ else:
+ return "".join(res)
def _get_streaminfo(self, channelname):
def clean_tag(tag):
@@ -74,7 +78,7 @@ class JustinTV(Plugin):
metadata = self._get_metadata(channelname)
chansub = metadata["access_guid"]
- if "login" in metadata:
+ if "login" in metadata and metadata["login"] is not None:
self.logger.debug("Successfully logged in as {0}", metadata["login"])