Skip to content

Commit

Permalink
Fixed deprecation warning for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fgoudreault committed Nov 13, 2018
1 parent 358f820 commit de23019
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions auxiclean/gui/equality_breaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ def compile_results(self):
else:
# confirm == "no"
return
self._logger.warn("Nombre de candidatures choisies invalide (%i/%i)" %
(len(choices), self.nchoices))
self._logger.warning("Nombre de candidatures choisies"
" invalide (%i/%i)" %
(len(choices), self.nchoices))

def get_checkboxes_results(self):
results = []
Expand Down
6 changes: 3 additions & 3 deletions auxiclean/user_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def command_line_input(list_equalities, nchoices, course, loglevel):
try:
choix = int(ans) - 1
except ValueError:
logger.warn("SVP, veuillez entrer un nombre entier.")
logger.warning("SVP, veuillez entrer un nombre entier.")
continue
else:
if choix < 0:
logger.warn("SVP, veuillez entrer un nombre > 0.")
logger.warning("SVP, veuillez entrer un nombre > 0.")
continue
good_ans = True
choices.append(list_equalities[choix])
Expand All @@ -53,7 +53,7 @@ def command_line_input(list_equalities, nchoices, course, loglevel):
yes = yes.lower()
if yes not in ("oui", "o", "y", "yes",
"non", "n", "no"):
logger.warn("Veuillez entrer oui ou non SVP")
logger.warning("Veuillez entrer oui ou non SVP")
continue
else:
good_ans = True
Expand Down

0 comments on commit de23019

Please sign in to comment.