Fix Drive KeyError: 'extension' (#283)

This commit is contained in:
Mohamed Akram 2020-06-18 01:56:33 +04:00 committed by GitHub
parent f0322355eb
commit 852151ef5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"]