logging.warn() was deprecated in Python 3.3, use logging.warning()

sed -i 's,logging\.warn(,logging.warning(,g' fdroid */*.*

https://docs.python.org/3.3/library/logging.html#logging.Logger.warning
This commit is contained in:
Hans-Christoph Steiner 2020-05-25 17:36:58 +02:00
parent 67332d83a5
commit 6030445be0
10 changed files with 34 additions and 31 deletions

View file

@ -137,9 +137,9 @@ def main():
system_langcode, system_encoding = locale.getdefaultlocale()
if system_encoding is None or system_encoding.lower() not in ('utf-8', 'utf8'):
logging.warn(_("Encoding is set to '{enc}' fdroid might run "
"into encoding issues. Please set it to 'UTF-8' "
"for best results.".format(enc=system_encoding)))
logging.warning(_("Encoding is set to '{enc}' fdroid might run "
"into encoding issues. Please set it to 'UTF-8' "
"for best results.".format(enc=system_encoding)))
try:
mod.main()