init.py warn is deprecated, using warning

loggin.warn is changed to loggin.warning
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-30 18:48:48 +02:00
parent 8b6562b471
commit fff1687e43

View File

@ -220,17 +220,17 @@ class OfflineImap:
if options.profiledir: if options.profiledir:
if not options.singlethreading: if not options.singlethreading:
# TODO, make use of chosen ui for logging # TODO, make use of chosen ui for logging
logging.warn("Profile mode: Forcing to singlethreaded.") logging.warning("Profile mode: Forcing to singlethreaded.")
options.singlethreading = True options.singlethreading = True
if os.path.exists(options.profiledir): if os.path.exists(options.profiledir):
# TODO, make use of chosen ui for logging # TODO, make use of chosen ui for logging
logging.warn("Profile mode: Directory '%s' already exists!" % logging.warning("Profile mode: Directory '%s' already exists!" %
options.profiledir) options.profiledir)
else: else:
os.mkdir(options.profiledir) os.mkdir(options.profiledir)
# TODO, make use of chosen ui for logging # TODO, make use of chosen ui for logging
logging.warn("Profile mode: Potentially large data will be " logging.warning("Profile mode: Potentially large data will be "
"created in '%s'" % options.profiledir) "created in '%s'" % options.profiledir)
# Override a config value. # Override a config value.
if options.configoverride: if options.configoverride: