mirror of https://github.com/CIRCL/PyCIRCLean
Refactor FileBase.extension
parent
fcbf2e6574
commit
5aaeac6f16
|
@ -49,10 +49,10 @@ class FileBase(object):
|
|||
@property
|
||||
def extension(self):
|
||||
_, ext = os.path.splitext(self.filename)
|
||||
ext = ext.lower()
|
||||
if ext == '':
|
||||
ext = None
|
||||
return ext
|
||||
return None
|
||||
else:
|
||||
return ext.lower()
|
||||
|
||||
@property
|
||||
def maintype(self):
|
||||
|
|
Loading…
Reference in New Issue