Refactor FileBase.extension

pull/16/head
Dan Puttick 2017-07-17 10:10:21 -04:00
parent fcbf2e6574
commit 5aaeac6f16
1 changed files with 3 additions and 3 deletions

View File

@ -49,10 +49,10 @@ class FileBase(object):
@property @property
def extension(self): def extension(self):
_, ext = os.path.splitext(self.filename) _, ext = os.path.splitext(self.filename)
ext = ext.lower()
if ext == '': if ext == '':
ext = None return None
return ext else:
return ext.lower()
@property @property
def maintype(self): def maintype(self):