From 3fccd106a0cc30e887787000802b104341eda16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 16 Sep 2020 21:08:02 +0200 Subject: [PATCH] chg: Pass a list to add_attributes --- examples/add_github_user.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/add_github_user.py b/examples/add_github_user.py index 8d82501..b9c9f72 100755 --- a/examples/add_github_user.py +++ b/examples/add_github_user.py @@ -45,8 +45,7 @@ if __name__ == '__main__': rfollowers = requests.get(github_user['followers_url']) followers = rfollowers.json() user_followers = [] - for follower in followers: - misp_object.add_attribute("follower", follower['login']) + misp_object.add_attributes("follower", *[follower['login'] for follower in followers]) misp_object.add_attribute('bio', github_user['bio']) misp_object.add_attribute('link', github_user['html_url']) misp_object.add_attribute('user-fullname', github_user['name'])