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):
|
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,
|
||||||
|
|
Loading…
Reference in a new issue