Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix archive URI not being removed when unpacking #28

Merged
merged 1 commit into from May 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions trollmoves/client.py
Expand Up @@ -260,6 +260,7 @@ def unpack_callback(var):
if not var['uid'].endswith(unpack):
return var
packname = var.pop('uid')
del var['uri']
new_names = unpackers[unpack](os.path.join(local_dir, packname), delete)

var['dataset'] = [dict(uid=nn, uri=os.path.join(local_dir, nn)) for nn in new_names]
Expand Down Expand Up @@ -297,7 +298,6 @@ def uri_callback(var):
path = os.path.join(duri.path, uid)
var['uri'] = urlunparse((scheme_, host_, path, "", "", ""))
return var

msg.data = translate_dict(msg.data, ('uri', 'uid'), uri_callback)
return msg

Expand Down Expand Up @@ -336,7 +336,6 @@ def request_push(msg, destination, login, publisher=None, unpack=None, delete=Fa
with cache_lock:
for uid in gen_dict_extract(msg.data, 'uid'):
file_cache.append(uid)

try:
lmsg = unpack_and_create_local_message(response, local_dir, unpack, delete)
except IOError:
Expand Down