mirror of https://github.com/CIRCL/PyCIRCLean
Refactor FileBase.extension
parent
fcbf2e6574
commit
5aaeac6f16
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue