Skip to content

Commit

Permalink
filenametimestamps: logging.warn → logging.warning
Browse files Browse the repository at this point in the history
  • Loading branch information
novoid committed May 31, 2020
1 parent 455c9a5 commit 6144e84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions memacs/filenametimestamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,10 @@ def __handle_file(self, file, rootdir):
if self.__check_timestamp_correctness(time1):
orgdate = OrgFormat.strdate(day1 + ' ' + time1, inactive=self._args.inactive_timestamps, show_time=True)
else:
logging.warn('File "' + file + '" has an invalid timestamp (' + str(time1) + '). Skipping this faulty time-stamp.')
logging.warning('File "' + file + '" has an invalid timestamp (' + str(time1) + '). Skipping this faulty time-stamp.')
orgdate = OrgFormat.strdate(day1, inactive=self._args.inactive_timestamps)
else:
logging.warn('File "' + file + '" has an invalid datestamp (' + str(day1) + '). Skipping this faulty date.')
logging.warning('File "' + file + '" has an invalid datestamp (' + str(day1) + ').')
# omit optional second day if first has an issue:
has_2ymd = False
has_2ymdhm = False
Expand All @@ -353,7 +353,7 @@ def __handle_file(self, file, rootdir):
# is not planned, so use the day as date-stamp
orgdate = OrgFormat.strdate(day1, inactive=self._args.inactive_timestamps)
else:
logging.warn('File "' + file + '" has an invalid datestamp (' + str(day1) + '). Skipping this faulty date.')
logging.warning('File "' + file + '" has an invalid datestamp (' + str(day1) + '). Skipping this faulty date.')
# omit optional second day if first has an issue:
has_2ymd = False
has_2ymdhm = False
Expand All @@ -365,16 +365,16 @@ def __handle_file(self, file, rootdir):
if self.__check_timestamp_correctness(time2):
orgdate += '--' + OrgFormat.strdate(day2 + ' ' + time2, inactive=self._args.inactive_timestamps, show_time=True)
else:
logging.warn('File "' + file + '" has an invalid timestamp (' + str(time2) + '). Skipping this faulty time-stamp.')
logging.warning('File "' + file + '" has an invalid timestamp (' + str(time2) + '). Skipping this faulty time-stamp.')
orgdate += '--' + OrgFormat.strdate(day2, inactive=self._args.inactive_timestamps)
else:
logging.warn('File "' + file + '" has an invalid datestamp (' + str(day2) + '). Skipping this faulty date.')
logging.warning('File "' + file + '" has an invalid datestamp (' + str(day2) + '). Skipping this faulty date.')
elif has_2ymd:
assert(day2)
if self.__check_datestamp_correctness(day2):
orgdate += '--' + OrgFormat.strdate(day2, inactive=self._args.inactive_timestamps)
else:
logging.warn('File "' + file + '" has an invalid datestamp (' + str(day2) + '). Skipping this faulty date.')
logging.warning('File "' + file + '" has an invalid datestamp (' + str(day2) + '). Skipping this faulty date.')
except TimestampParseException:
logging.error('File "' + str(file) + '" has in invalid date- or timestamp. OrgFormat of one of day1: "' +
str(day1) + '" time1: "' + str(time1) + '" day2: "' +
Expand Down

0 comments on commit 6144e84

Please sign in to comment.