Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed handling of articles that have no downloadables #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ads2bibdesk/ads2bibdesk.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def process_token(article_identifier, prefs, bibdesk):
article_bibcode = ads_article.bibcode
article_esources = ads_article.esources

if 'true' in prefs['options']['download_pdf'].lower():
if 'true' in prefs['options']['download_pdf'].lower() and article_esources is not None:
pdf_filename, pdf_status = process_pdf(article_bibcode, article_esources,
prefs=prefs)
else:
Expand Down Expand Up @@ -283,7 +283,7 @@ def process_token(article_identifier, prefs, bibdesk):
# add URLs as linked URL if not there yet
urls = bibdesk('value of fields whose name ends with "url"',
pub, strlist=True)
if 'EPRINT_HTML' in article_esources:
if article_esources is not None and 'EPRINT_HTML' in article_esources:
urls += [get_esource_link(article_bibcode, esource_type='eprint_html')]

urlspub = bibdesk('linked URLs', pub, strlist=True)
Expand Down