Only call self.get_files if no path provided.

Note that self.find(path) still calls get_files internally so it's
going to happen either way -- this just removes a redundant call.
This commit is contained in:
Ethan Dalool 2020-03-23 19:57:12 -07:00
parent 4143b7c9db
commit 406531924c

View file

@ -609,8 +609,8 @@ class Mega:
return self.get_link(node) return self.get_link(node)
def export(self, path=None, node_id=None): def export(self, path=None, node_id=None):
nodes = self.get_files()
if node_id: if node_id:
nodes = self.get_files()
node = nodes[node_id] node = nodes[node_id]
else: else:
node = self.find(path) node = self.find(path)