From a19c44d563606ddbd11a82bd8e444461eb1582e4 Mon Sep 17 00:00:00 2001 From: Gioele Barabucci Date: Thu, 17 Feb 2022 11:39:22 +0100 Subject: mini-dinstall: Avoid outdated `logger.warn` Python 3 deprecated the `logger.warn` method: ``` DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead ``` --- mini-dinstall | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mini-dinstall b/mini-dinstall index cb18fef..e6e1225 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -280,7 +280,7 @@ if os.access(lockfilename, os.R_OK): if run_mode: logger.error(error) sys.exit(1) - logger.warn(warn) + logger.warning(warn) os.unlink(lockfilename) if kill_mode: sys.exit(0) @@ -448,7 +448,7 @@ for dist in list(distributions.keys()): if distributions[dist]['archive_style'] not in ('simple-subdir', 'flat'): raise DinstallException('Unknown archive style "%s"' % distributions[dist]['archive_style']) if distributions[dist]['chown_changes_files'] is not None: - logger.warn("'chown_changes_files' is deprecated, please use 'restrict_changes_files' instead") + logger.warning("'chown_changes_files' is deprecated, please use 'restrict_changes_files' instead") if distributions[dist]['restrict_changes_files'] is None: distributions[dist]['restrict_changes_files'] = distributions[dist]['chown_changes_files'] if distributions[dist]['restrict_changes_files'] is None: @@ -531,7 +531,7 @@ class IncomingDir(threading.Thread): logger.exception('Unable to install "%s"; adding to screwed list' % changefilename) initial_fucked_list.append(changefilename) else: - self._logger.warn('Skipping "%s"; upload incomplete' % changefilename) + self._logger.warning('Skipping "%s"; upload incomplete' % changefilename) initial_reprocess_queue.append(changefilename) if not self._batch_mode: self._daemonize(initial_reprocess_queue, initial_fucked_list) -- cgit v1.2.3