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

Commit

Permalink
improves running list data
Browse files Browse the repository at this point in the history
  • Loading branch information
FeeiCN committed Aug 11, 2017
1 parent 8a217ca commit b2e2b90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cobra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def main():
if args.sid is None:
a_sid = get_sid(args.target, True)
data = {
'sids': []
'sids': {}
}
Running(a_sid).list(data)
data = {
Expand Down
6 changes: 3 additions & 3 deletions cobra/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def post():
}

a_sid_data = {
'sids': []
'sids': {}
}
running = Running(a_sid)

Expand Down Expand Up @@ -145,8 +145,8 @@ def post():
r_data = running.list()
ret = True
logger.info(r_data['sids'])
for s in r_data['sids']:
if Running(s).is_file(True) is False:
for sid, git in r_data['sids'].items():
if Running(sid).is_file(True) is False:
ret = False
if ret:
result['status'] = 'done'
Expand Down
2 changes: 1 addition & 1 deletion cobra/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def start(target, formatter, output, special_rules, a_sid=None):
s_sid = get_sid(target)
r = Running(a_sid)
data = r.list()
data['sids'].append(s_sid)
data['sids'][s_sid] = target
r.list(data)

report = '?sid={a_sid}'.format(a_sid=a_sid)
Expand Down

0 comments on commit b2e2b90

Please sign in to comment.