aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlice Ferrazzi <alice.ferrazzi@gmail.com>2017-08-18 22:42:49 +0900
committerAlice Ferrazzi <alice.ferrazzi@gmail.com>2017-08-18 22:42:49 +0900
commit9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c (patch)
treea2ecf4e8e7112b57fe388bb16bb1df735d9c0b75
parentadded docstring (diff)
downloadelivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.tar.gz
elivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.tar.bz2
elivepatch-9b63ce1d28e6fd20bca305a93ea3ad9586f5d53c.zip
remove duplicated from the cve list
-rw-r--r--elivepatch_client/client/security.py4
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