From 852151ef5fd197aa7e2053d4d6ad9c5362fbd170 Mon Sep 17 00:00:00 2001 From: Mohamed Akram Date: Thu, 18 Jun 2020 01:56:33 +0400 Subject: [PATCH] Fix Drive KeyError: 'extension' (#283) --- pyicloud/services/drive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyicloud/services/drive.py b/pyicloud/services/drive.py index a97f684..543a319 100644 --- a/pyicloud/services/drive.py +++ b/pyicloud/services/drive.py @@ -78,7 +78,7 @@ class DriveNode(object): @property def name(self): """Gets the node name.""" - if self.type == "file": + if "extension" in self.data: return "%s.%s" % (self.data["name"], self.data["extension"]) return self.data["name"]