|
|
@@ -1030,7 +1030,10 @@ def cmd_modify(options, persona, objstr, cache): |
|
|
|
try: |
|
|
|
key, v = k |
|
|
|
except ValueError: |
|
|
|
del obj[k[0]] |
|
|
|
try: |
|
|
|
del obj[k[0]] |
|
|
|
except KeyError: |
|
|
|
pass |
|
|
|
else: |
|
|
|
obj[key].remove(v) |
|
|
|
|
|
|
@@ -1372,7 +1375,7 @@ def cmd_dump(options, persona, objstr, cache): |
|
|
|
print(i.encode('json')) |
|
|
|
|
|
|
|
def cmd_auto(options): |
|
|
|
for i in options.files: |
|
|
|
for i in options.files[:]: |
|
|
|
mf = detect_from_filename(i) |
|
|
|
|
|
|
|
primary = mf[0].split('/', 1)[0] |
|
|
@@ -1388,7 +1391,8 @@ def cmd_auto(options): |
|
|
|
inp = sys.stdin.readline() |
|
|
|
|
|
|
|
if inp.strip().lower() in ('y', 'yes'): |
|
|
|
options.modtagvalues = [ '+mimetype=%s' % mt ] |
|
|
|
options.modtagvalues = [ '-mimetype', '+mimetype=%s' % mt ] |
|
|
|
options.files = [ i ] |
|
|
|
cmd_modify(options) |
|
|
|
|
|
|
|
@init_datastructs |
|
|
|