mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
Fixed indentation in OleFileIO
This commit is contained in:
parent
540a225ea0
commit
e8679dff66
|
@ -360,12 +360,12 @@ WORD_CLSID = "00020900-0000-0000-C000-000000000046"
|
||||||
#TODO: check Excel, PPT, ...
|
#TODO: check Excel, PPT, ...
|
||||||
|
|
||||||
#[PL]: Defect levels to classify parsing errors - see OleFileIO._raise_defect()
|
#[PL]: Defect levels to classify parsing errors - see OleFileIO._raise_defect()
|
||||||
DEFECT_UNSURE = 10 # a case which looks weird, but not sure it's a defect
|
DEFECT_UNSURE = 10 # a case which looks weird, but not sure it's a defect
|
||||||
DEFECT_POTENTIAL = 20 # a potential defect
|
DEFECT_POTENTIAL = 20 # a potential defect
|
||||||
DEFECT_INCORRECT = 30 # an error according to specifications, but parsing
|
DEFECT_INCORRECT = 30 # an error according to specifications, but parsing
|
||||||
# can go on
|
# can go on
|
||||||
DEFECT_FATAL = 40 # an error which cannot be ignored, parsing is
|
DEFECT_FATAL = 40 # an error which cannot be ignored, parsing is
|
||||||
# impossible
|
# impossible
|
||||||
|
|
||||||
#[PL] add useful constants to __all__:
|
#[PL] add useful constants to __all__:
|
||||||
for key in list(vars().keys()):
|
for key in list(vars().keys()):
|
||||||
|
@ -468,14 +468,14 @@ def _unicode(s, errors='replace'):
|
||||||
|
|
||||||
|
|
||||||
def filetime2datetime(filetime):
|
def filetime2datetime(filetime):
|
||||||
"""
|
"""
|
||||||
convert FILETIME (64 bits int) to Python datetime.datetime
|
convert FILETIME (64 bits int) to Python datetime.datetime
|
||||||
"""
|
"""
|
||||||
# TODO: manage exception when microseconds is too large
|
# TODO: manage exception when microseconds is too large
|
||||||
# inspired from http://code.activestate.com/recipes/511425-filetime-to-datetime/
|
# inspired from http://code.activestate.com/recipes/511425-filetime-to-datetime/
|
||||||
_FILETIME_null_date = datetime.datetime(1601, 1, 1, 0, 0, 0)
|
_FILETIME_null_date = datetime.datetime(1601, 1, 1, 0, 0, 0)
|
||||||
#debug('timedelta days=%d' % (filetime//(10*1000000*3600*24)))
|
#debug('timedelta days=%d' % (filetime//(10*1000000*3600*24)))
|
||||||
return _FILETIME_null_date + datetime.timedelta(microseconds=filetime//10)
|
return _FILETIME_null_date + datetime.timedelta(microseconds=filetime//10)
|
||||||
|
|
||||||
|
|
||||||
#=== CLASSES ==================================================================
|
#=== CLASSES ==================================================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user