|
|
@@ -1377,6 +1377,7 @@ def cmd_auto(options): |
|
|
|
|
|
|
|
@init_datastructs |
|
|
|
def cmd_list(options, persona, objstr, cache): |
|
|
|
exit = 0 |
|
|
|
for i in options.files: |
|
|
|
try: |
|
|
|
objs = objstr.by_file(i) |
|
|
@@ -1390,12 +1391,16 @@ def cmd_list(options, persona, objstr, cache): |
|
|
|
objs = objstr.by_file(i) |
|
|
|
except (FileNotFoundError, KeyError) as e: |
|
|
|
print('ERROR: file not found: %s' % repr(i), file=sys.stderr) |
|
|
|
sys.exit(1) |
|
|
|
exit = 1 |
|
|
|
continue |
|
|
|
|
|
|
|
for j in objstr.by_file(i): |
|
|
|
for k, v in _iterdictlist(j): |
|
|
|
print('%s:\t%s' % (k, v)) |
|
|
|
|
|
|
|
if exit: |
|
|
|
sys.exit(exit) |
|
|
|
|
|
|
|
def handle_bittorrent(fname, persona, objstr): |
|
|
|
with open(fname, 'rb') as fp: |
|
|
|
torrent = bencode.bdecode(fp.read()) |
|
|
|