From 81d208dd6142d3245205c88720ac30e79c37661c Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sat, 2 Mar 2013 21:28:58 +0100 Subject: [PATCH] Fix whitespace damage (causing indentation errors) --- lib/svtplay/service/aftonbladet.py | 6 ++-- lib/svtplay/tests/output.py | 48 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/svtplay/service/aftonbladet.py b/lib/svtplay/service/aftonbladet.py index 55033c9..a1e0458 100644 --- a/lib/svtplay/service/aftonbladet.py +++ b/lib/svtplay/service/aftonbladet.py @@ -35,14 +35,14 @@ class Aftonbladet(): xml = ET.XML(data) url = xml.find("articleElement").find("mediaElement").find("baseUrl").text path = xml.find("articleElement").find("mediaElement").find("media").attrib["url"] - live = xml.find("articleElement").find("mediaElement").find("isLive").text + live = xml.find("articleElement").find("mediaElement").find("isLive").text options.other = "-y %s" % path if start > 0: options.other = "%s -A %s" % (options.other, str(start)) - if live == "true": - options.live = True + if live == "true": + options.live = True if url == None: log.error("Can't find any video on that page") diff --git a/lib/svtplay/tests/output.py b/lib/svtplay/tests/output.py index eea5e9c..284ea64 100644 --- a/lib/svtplay/tests/output.py +++ b/lib/svtplay/tests/output.py @@ -21,43 +21,43 @@ class progressbarTest(unittest.TestCase): svtplay.output.progress_stream = self.mockfile def test_0_100(self): - svtplay.output.progressbar(100, 0) + svtplay.output.progressbar(100, 0) self.assertEqual( - self.mockfile.read(), - "\r[000/100][..................................................] " - ) + self.mockfile.read(), + "\r[000/100][..................................................] " + ) def test_progress_1_100(self): - svtplay.output.progressbar(100, 1) + svtplay.output.progressbar(100, 1) self.assertEqual( - self.mockfile.read(), - "\r[001/100][..................................................] " - ) + self.mockfile.read(), + "\r[001/100][..................................................] " + ) def test_progress_2_100(self): - svtplay.output.progressbar(100, 2) + svtplay.output.progressbar(100, 2) self.assertEqual( - self.mockfile.read(), - "\r[002/100][=.................................................] " - ) + self.mockfile.read(), + "\r[002/100][=.................................................] " + ) def test_progress_50_100(self): - svtplay.output.progressbar(100, 50) + svtplay.output.progressbar(100, 50) self.assertEqual( - self.mockfile.read(), - "\r[050/100][=========================.........................] " - ) + self.mockfile.read(), + "\r[050/100][=========================.........................] " + ) def test_progress_100_100(self): - svtplay.output.progressbar(100, 100) + svtplay.output.progressbar(100, 100) self.assertEqual( - self.mockfile.read(), - "\r[100/100][==================================================] " - ) + self.mockfile.read(), + "\r[100/100][==================================================] " + ) def test_progress_20_100_msg(self): - svtplay.output.progressbar(100, 20, "msg") + svtplay.output.progressbar(100, 20, "msg") self.assertEqual( - self.mockfile.read(), - "\r[020/100][==========........................................] msg" - ) + self.mockfile.read(), + "\r[020/100][==========........................................] msg" + )