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

Comments

Projects
None yet
1 participant
@ryran
Owner

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

This comment has been minimized.

Show comment
Hide comment
@ryran

ryran Nov 24, 2016

Owner

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
[]
Owner

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 Nov 24, 2016

@ryran ryran reopened this Nov 24, 2016

@ryran

This comment has been minimized.

Show comment
Hide comment
@ryran

ryran Nov 24, 2016

Owner

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

Owner

ryran commented Nov 24, 2016

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

@ryran ryran closed this in eb74965 Nov 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment