The code was not robust anymore in weird cases where file['k']=='', it is now.

This commit is contained in:
gissehel 2013-04-27 19:52:09 +02:00
parent ced5b616e1
commit 972bfd8852

View file

@ -106,7 +106,7 @@ class Mega(object):
Process a file
"""
if file['t'] == 0 or file['t'] == 1:
keys = dict(keypart.split(':', 1) for keypart in file['k'].split('/'))
keys = dict(keypart.split(':', 1) for keypart in file['k'].split('/') if ':' in keypart)
uid = file['u']
key = None
# my objects