diff options
| author | 2022-02-17 11:39:22 +0100 | |
|---|---|---|
| committer | 2022-02-17 11:39:22 +0100 | |
| commit | a19c44d563606ddbd11a82bd8e444461eb1582e4 (patch) | |
| tree | 9a99b2d2b10087649bb9adf2270797f43d740c74 /mini-dinstall | |
| parent | 7d908f4378e4d7bb6a84298a31379b270cdb6868 (diff) | |
mini-dinstall: Avoid outdated `logger.warn`
Python 3 deprecated the `logger.warn` method:
```
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
```
Diffstat (limited to 'mini-dinstall')
| -rwxr-xr-x | mini-dinstall | 6 |
1 files 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) |
