Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2005-08-13 21:06:25 +0200
committerArthur de Jong <arthur@arthurdejong.org>2005-08-13 21:06:25 +0200
commit4159d647e0eb8e4cea44ec8aa325ef66eb4aa1db (patch)
tree8177f1a291081c93b5c8ad855d27ee75ac97c0bc
parentc8fd15757ccbf5319569cfe9e4d526ffcc570d97 (diff)
add missing newline and trim trailing newline of extra link info
git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@131 86f53f14-5ff3-0310-afe5-9b438ce3f40c
-rw-r--r--plugins/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/__init__.py b/plugins/__init__.py
index 4cc961d..2bd5399 100644
--- a/plugins/__init__.py
+++ b/plugins/__init__.py
@@ -74,7 +74,7 @@ def get_info(link):
info += '\n'
if link.redirectdepth > 0:
if len(link.children) > 0:
- info += 'redirect: %s' % link.children[0].url
+ info += 'redirect: %s\n' % link.children[0].url
else:
info += 'redirect (not followed)\n'
if len(link.parents) == 1:
@@ -89,7 +89,8 @@ def get_info(link):
info += 'mime-type: %s\n' % link.mimetype
if link.status:
info += 'status: %s\n' % link.status
- return info
+ # trim trailing newline
+ return info.strip()
def make_link(link,title=None):
"""Return an <a>nchor to a url with title. If url is in the Linklist and