sarugaku / passa

Resolver implementation and toolset for generating and interacting with Pipfile and Pipfile.lock.
ISC License
53 stars 12 forks source link

Running `add` against projects with no lockfile fails #51

Closed techalchemy closed 6 years ago

techalchemy commented 6 years ago
$ passa add apache-airflow
...
Traceback (most recent call last):
  File "/home/hawk/.pyenv/versions/3.7.0/bin/passa", line 11, in <module>
    load_entry_point('passa', 'console_scripts', 'passa')()
  File "/home/hawk/git/passa/src/passa/cli/__init__.py", line 47, in main
    result = f(options)
  File "/home/hawk/git/passa/src/passa/cli/add.py", line 95, in main
    return super(Command, self).main(options)
  File "/home/hawk/git/passa/src/passa/cli/_base.py", line 73, in main
    return type(self).__dict__["parsed_main"](options)
  File "/home/hawk/git/passa/src/passa/cli/add.py", line 47, in main
    lockfile_diff = project.difference_lockfile(prev_lockfile)
  File "/home/hawk/git/passa/src/passa/internals/projects.py", line 222, in difference_lockfile
    that = lockfile[section_name]._data
TypeError: 'NoneType' object is not subscriptable