From 70eec18c1db478fe638f988ff969560884a83897 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Mon, 24 Jun 2013 19:58:11 +0200 Subject: [PATCH] FIX missing import in files. --- papers/commands/list_cmd.py | 9 ++++----- papers/files.py | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/papers/commands/list_cmd.py b/papers/commands/list_cmd.py index 02cd9a5..37946d2 100644 --- a/papers/commands/list_cmd.py +++ b/papers/commands/list_cmd.py @@ -48,7 +48,7 @@ def test_paper(query_string, p): if field in ['labels', 'l', 'tags', 't']: if value not in p.metadata['labels']: return False - elif field in ['authors', 'a']: # that is the very ugly + elif field in ['author', 'authors', 'a']: # that is the very ugly if not 'author' in p.bibentry.persons: return False a = False @@ -56,10 +56,9 @@ def test_paper(query_string, p): if value in p.last()[0]: a = True return a - else: - if field in p.bibentry.fields: + elif field in p.bibentry.fields: if value not in p.bibentry.fields[field]: return False - else: - return False + else: + return False return True diff --git a/papers/files.py b/papers/files.py index ad79abf..0af1cda 100644 --- a/papers/files.py +++ b/papers/files.py @@ -6,6 +6,7 @@ import yaml from . import ui from . import configs +from . import color try: import pybtex