From fb55b1d780f9202e38b10b1d96ec18dd624a201f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 18 May 2022 22:22:50 +0200 Subject: [PATCH] Avoid breakage with Python 3.13. (#354) --- changelogs/fragments/354-remove-dead-code.yml | 2 ++ plugins/modules/docker_container.py | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/354-remove-dead-code.yml diff --git a/changelogs/fragments/354-remove-dead-code.yml b/changelogs/fragments/354-remove-dead-code.yml new file mode 100644 index 00000000..d2addf5c --- /dev/null +++ b/changelogs/fragments/354-remove-dead-code.yml @@ -0,0 +1,2 @@ +bugfixes: + - "docker_container - remove unused code that will cause problems with Python 3.13 (https://github.com/ansible-collections/community.docker/pull/354)." diff --git a/plugins/modules/docker_container.py b/plugins/modules/docker_container.py index dc83f4ea..f339558a 100644 --- a/plugins/modules/docker_container.py +++ b/plugins/modules/docker_container.py @@ -1188,7 +1188,6 @@ status: ''' import os -import pipes import re import shlex import traceback @@ -1228,14 +1227,6 @@ except Exception: pass -def shell_join(parts): - if getattr(shlex, 'quote', None): - quote = shlex.quote - else: - quote = pipes.quote - return ' '.join([quote(part) for part in parts]) - - REQUIRES_CONVERSION_TO_BYTES = [ 'kernel_memory', 'memory',