Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
fix dict error in when running on python 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
40huo committed Sep 12, 2017
1 parent 7e31378 commit 6d05c1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cobra/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def search_rule(sid, rule_id):
:return: {rule_name1: num1, rule_name2: num2}
"""
scan_data_file = os.path.join(running_path, '{sid}_data'.format(sid=sid))
search_result = {id: 0 for id in rule_id}
search_result = dict.fromkeys(rule_id, 0)
if not os.path.exists(scan_data_file):
return search_result

Expand Down

0 comments on commit 6d05c1a

Please sign in to comment.