Check for more target types but also raise TypeError if n/a.

This commit is contained in:
Ethan Dalool 2020-03-23 19:55:35 -07:00
parent d7980400cb
commit 4143b7c9db

View file

@ -969,9 +969,16 @@ class Mega:
elif isinstance(target, str): elif isinstance(target, str):
target_node_id = target target_node_id = target
elif isinstance(target, dict):
target_node_id = target['h']
elif isinstance(target, tuple):
target_node_id = target[1]['h']
else: else:
file = target[1] raise TypeError(target)
target_node_id = file['h']
request = { request = {
'a': 'm', 'a': 'm',
'n': file_id, 'n': file_id,