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

when input passed to rhsda.ApiClient.mget_cves() has no CVEs, return empty list instead of failing #50

Closed
ryran opened this issue Nov 24, 2016 · 2 comments
Assignees
Labels

Comments

@ryran
Copy link
Collaborator

ryran commented Nov 24, 2016

Currently:

>>> o = a.mget_cves("no cves here")
[WARNING] rhsda: No CVEs (matching regex: 'CVE-[0-9]{4}-[0-9]{4,}') found on input
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rhsda.py", line 670, in mget_cves
    pool = multiprocessing.Pool(processes=numThreads)
  File "/usr/lib64/python2.7/multiprocessing/dummy/__init__.py", line 151, in Pool
    return ThreadPool(processes, initializer, initargs)
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 727, in __init__
    Pool.__init__(self, processes, initializer, initargs)
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 152, in __init__
    raise ValueError("Number of processes must be at least 1")
ValueError: Number of processes must be at least 1
@ryran ryran added the bug label Nov 24, 2016
@ryran ryran self-assigned this Nov 24, 2016
@ryran
Copy link
Collaborator Author

ryran commented Nov 24, 2016

After fix:

>>> o = a.mget_cves("no cves here")
[WARNING] rhsda: No CVEs (matching regex: 'CVE-[0-9]{4}-[0-9]{4,}') found on input
>>> o
[]

ryran added a commit that referenced this issue Nov 24, 2016
@ryran ryran closed this as completed Nov 24, 2016
@ryran ryran reopened this Nov 24, 2016
@ryran
Copy link
Collaborator Author

ryran commented Nov 24, 2016

Actually: should only return an empty list when outFormat='json'; otherwise, should return empty string.

@ryran ryran closed this as completed in eb74965 Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant