diff options
author | 2017-08-18 22:42:49 +0900 | |
---|---|---|
committer | 2017-08-18 22:42:49 +0900 | |
commit | 9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c (patch) | |
tree | a2ecf4e8e7112b57fe388bb16bb1df735d9c0b75 | |
parent | added docstring (diff) | |
download | elivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.tar.gz elivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.tar.bz2 elivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.zip |
remove duplicated from the cve list
-rw-r--r-- | elivepatch_client/client/security.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/elivepatch_client/client/security.py b/elivepatch_client/client/security.py index c322b0a..7c97f57 100644 --- a/elivepatch_client/client/security.py +++ b/elivepatch_client/client/security.py @@ -48,8 +48,8 @@ class CVE(object): if not os.path.exists(self.cve_patches_dir): os.mkdir(self.cve_patches_dir) for cve_list in cve_2d_list: - print(cve_list) - print([ii for n,ii in enumerate(cve_list) if ii not in cve_list[:n]]) + # Remove duplicated cve_id from the cve list for not add the same patch + cve_list = [ii for n,ii in enumerate(cve_list) if ii not in cve_list[:n]] for cve_id in cve_list: self.download_cve_patch(cve_id, str(patch_index)) patch_index +=1 |