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):
target_node_id = target
elif isinstance(target, dict):
target_node_id = target['h']
elif isinstance(target, tuple):
target_node_id = target[1]['h']
else:
file = target[1]
target_node_id = file['h']
raise TypeError(target)
request = {
'a': 'm',
'n': file_id,