|
|
@@ -1426,8 +1426,11 @@ def cmd_list(options, persona, objstr, cache): |
|
|
|
continue |
|
|
|
|
|
|
|
for j in objstr.by_file(i): |
|
|
|
for k, v in _iterdictlist(j): |
|
|
|
print('%s:\t%s' % (k, v)) |
|
|
|
if options.json: |
|
|
|
print(j.encode('json')) |
|
|
|
else: |
|
|
|
for k, v in _iterdictlist(j): |
|
|
|
print('%s:\t%s' % (k, v)) |
|
|
|
|
|
|
|
if exit: |
|
|
|
sys.exit(exit) |
|
|
@@ -1810,6 +1813,8 @@ def main(): |
|
|
|
parser_auto.set_defaults(func=cmd_auto) |
|
|
|
|
|
|
|
parser_list = subparsers.add_parser('list', help='list tags on file(s)') |
|
|
|
parser_list.add_argument('--json', action='store_true', |
|
|
|
help='output data as series of JSON objects') |
|
|
|
parser_list.add_argument('files', nargs='+', |
|
|
|
help='files to modify') |
|
|
|
parser_list.set_defaults(func=cmd_list) |
|
|
@@ -2478,7 +2483,7 @@ class _TestCases(unittest.TestCase): |
|
|
|
|
|
|
|
def objcompare(self, fullobjs, partialobjs): |
|
|
|
fullobjs = list(fullobjs) |
|
|
|
#_debprint('objs:', repr(fullobjs)) |
|
|
|
#_debprint('objs:', repr(fullobjs), repr(partialobjs)) |
|
|
|
self.assertEqual(len(fullobjs), len(partialobjs)) |
|
|
|
|
|
|
|
missing = [] |
|
|
|