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

Running bulk text match task fails if repo is empty #2

Closed
swinslow opened this issue Oct 5, 2018 · 0 comments
Closed

Running bulk text match task fails if repo is empty #2

swinslow opened this issue Oct 5, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@swinslow
Copy link
Contributor

swinslow commented Oct 5, 2018

Appears to fail because no files means it crashes when it can't retrieve license data:

Traceback (most recent call last):
  File "upload-**********.py", line 256, in <module>
    runTasksForUpload(server, projectName, zipPath, uploadName)
  File "upload-**********.py", line 214, in runTasksForUpload
    retval = t.run()
  File "/Users/steve/programming/lftools/fossdriver/fossdriver/tasks.py", line 260, in run
    a = self._makeRealAction(licenseName, actionType)
  File "/Users/steve/programming/lftools/fossdriver/fossdriver/tasks.py", line 234, in _makeRealAction
    licenseId = self._findLicenseID(licenseName)
  File "/Users/steve/programming/lftools/fossdriver/fossdriver/tasks.py", line 224, in _findLicenseID
    self.parsedLicenses = self.server.GetLicenses(u._id, u.topTreeItemId)
  File "/Users/steve/programming/lftools/fossdriver/fossdriver/server.py", line 235, in GetLicenses
    licenses = fossdriver.parser.parseAllLicenseData(results.content)
  File "/Users/steve/programming/lftools/fossdriver/fossdriver/parser.py", line 127, in parseAllLicenseData
    options = sel.find_all("option")
AttributeError: 'NoneType' object has no attribute 'find_all'

(transferred from https://gitlab.com/swinslow/fossdriver/issues/1)

@swinslow swinslow self-assigned this Oct 5, 2018
@swinslow swinslow added the bug Something isn't working label Oct 5, 2018
swinslow added a commit that referenced this issue Oct 8, 2018
fix(parser): Fixes #2 to avoid crash if upload has no files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant