Fix bug and adds doc.

- Fix wrong call to editor_input in add_cmd.
- Adds docstring to PapersInRepo class.
This commit is contained in:
Olivier Mangin 2013-07-04 18:13:30 +02:00
parent 53e6aa512e
commit e4ad9745c1
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,7 @@ def command(args):
bibstr = '' bibstr = ''
while cont: while cont:
try: try:
bibstr = files.editor_input(config, bibstr, suffix='.yaml') bibstr = files.editor_input(config().edit_cmd, bibstr, suffix='.yaml')
key, bib = get_bibentry_from_string(bibstr) key, bib = get_bibentry_from_string(bibstr)
cont = False cont = False
except Exception: except Exception:

View File

@ -271,7 +271,10 @@ class Paper(object):
self.tags.discard(tag) self.tags.discard(tag)
class PaperInRepo(Paper): # TODO document why this class exists (fabien, 2013/06) class PaperInRepo(Paper):
"""Extend paper class with command specific to the case where the paper
lives in a repository.
"""
def __init__(self, repo, *args, **kwargs): def __init__(self, repo, *args, **kwargs):
Paper.__init__(self, *args, **kwargs) Paper.__init__(self, *args, **kwargs)