From 7c50bdbaaad162fb5914c7694b4684455c73e5e7 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 16 Jan 2013 02:41:56 -0600 Subject: [PATCH] better case handling for find_citation_pdf_url --- modules/papers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/papers.py b/modules/papers.py index 1a2aeb4..91feeed 100644 --- a/modules/papers.py +++ b/modules/papers.py @@ -111,7 +111,6 @@ def download(phenny, input, verbose=True): phenny.say(download_url(line)) continue elif verbose and explicit: - phenny.say("error: dunno how to find the pdf on " + line) phenny.say(download_url(line)) continue elif verbose and explicit: @@ -195,7 +194,7 @@ def find_citation_pdf_url(tree, url): Returns the content attribute. """ citation_pdf_url = extract_meta_content(tree, "citation_pdf_url") - if not citation_pdf_url.startswith("http"): + if citation_pdf_url and not citation_pdf_url.startswith("http"): if citation_pdf_url.startswith("/"): url_start = url[:url.find("/",8)] citation_pdf_url = url_start + citation_pdf_url