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 @property
def name(self): def name(self):
"""Gets the node name.""" """Gets the node name."""
if self.type == "file": if "extension" in self.data:
return "%s.%s" % (self.data["name"], self.data["extension"]) return "%s.%s" % (self.data["name"], self.data["extension"])
return self.data["name"] return self.data["name"]