Check for more target types but also raise TypeError if n/a.
This commit is contained in:
parent
d7980400cb
commit
4143b7c9db
1 changed files with 9 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue