#!/usr/bin/python
################################################################################
# DOCUMENTS
#
# Justin Dierking
# justin.l.dierking.civ@mail.mil
# 614 692 2050
#
# 04/22/2018 Original Construction
################################################################################

import traceback
import json

class Task:
    def __init__(self):
        self.output = []
        self.status = STATUS_NOT_EXECUTED

    def execute(self, cli):
        try:
            keys = cli.AGTCollections("tags")
            
            self.status = STATUS_SUCCESS
            
            for key in keys.find():
                #key.set()
                self.output.append(json.dumps(key.object, indent = 4))

        except Exception:
            self.status = STATUS_EXCEPTION
            self.output.append(traceback.format_exc())
        
        return self.status
[((28, 35, 28, 69), 'json.dumps', 'json.dumps', (), '', False, 'import json\n'), ((32, 31, 32, 53), 'traceback.format_exc', 'traceback.format_exc', ({}, {}), '()', False, 'import traceback\n')]