aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStevan Radakovic <stevan.radakovic@linaro.org>2012-05-10 17:01:27 +0200
committerStevan Radakovic <stevan.radakovic@linaro.org>2012-05-10 17:01:27 +0200
commit1214201a060229bb0853aea1f2ea1a90bbabe196 (patch)
tree8022ec0a69a367d4056393e3254848e905383b82
parente3109b869296aef1fb4d2c8769f6d4f138737419 (diff)
Wrong identation fix in _get_license method
-rw-r--r--testing/license_protected_file_downloader.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/testing/license_protected_file_downloader.py b/testing/license_protected_file_downloader.py
index d4ebacd..c0c9e81 100644
--- a/testing/license_protected_file_downloader.py
+++ b/testing/license_protected_file_downloader.py
@@ -190,29 +190,29 @@ class LicenseProtectedFileFetcher:
r"""href=.*?["'](.*?-declined.html)""",
line)
- if accept_search and decline_search:
- # Have found license accept URL!
- new_file = accept_search.group(1)
- accept_url = re.sub(file, new_file, location)
+ if accept_search and decline_search:
+ # Have found license accept URL!
+ new_file = accept_search.group(1)
+ accept_url = re.sub(file, new_file, location)
- # Found decline URL as well.
- new_file_decline = decline_search.group(1)
- decline_url = re.sub(file, new_file_decline, location)
+ # Found decline URL as well.
+ new_file_decline = decline_search.group(1)
+ decline_url = re.sub(file, new_file_decline, location)
- # Parse the HTML using BeautifulSoup
- soup = BeautifulSoup(self.body)
+ # Parse the HTML using BeautifulSoup
+ soup = BeautifulSoup(self.body)
- # The license is in a div with the ID license-text, so we
- # use this to pull just the license out of the HTML.
- html_license = u""
- for chunk in soup.findAll(id="license-text"):
- # Output of chunk.prettify is UTF8, but comes back
- # as a str, so convert it here.
- html_license += chunk.prettify().decode("utf-8")
+ # The license is in a div with the ID license-text, so we
+ # use this to pull just the license out of the HTML.
+ html_license = u""
+ for chunk in soup.findAll(id="license-text"):
+ # Output of chunk.prettify is UTF8, but comes back
+ # as a str, so convert it here.
+ html_license += chunk.prettify().decode("utf-8")
- text_license = html2text.html2text(html_license)
+ text_license = html2text.html2text(html_license)
- return text_license, accept_url, decline_url
+ return text_license, accept_url, decline_url
return None