From 36d7ba1408bfe8676ab0d35b5f275b94f5177334 Mon Sep 17 00:00:00 2001 From: peanutduck <65247441+peanutduck@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:01:31 +0800 Subject: [PATCH] Fixed TypeError instancemethod expecting at least 2 arguments (#69463) * Fixed TypeError instancemethod expecting at least 2 arguments * added changlelog for 69463 --- .../69463-fix-apt_repository-typeerror- instancemethod.yaml | 2 ++ lib/ansible/modules/apt_repository.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 changelogs/fragments/69463-fix-apt_repository-typeerror- instancemethod.yaml diff --git a/changelogs/fragments/69463-fix-apt_repository-typeerror- instancemethod.yaml b/changelogs/fragments/69463-fix-apt_repository-typeerror- instancemethod.yaml new file mode 100644 index 00000000000..dbe68aca6dd --- /dev/null +++ b/changelogs/fragments/69463-fix-apt_repository-typeerror- instancemethod.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Fixed TypeError instancemethod expecting at least 2 arguments for apt_repository(issue https://github.com/ansible/ansible/issues/69308, PR https://github.com/ansible/ansible/pull/69463) \ No newline at end of file diff --git a/lib/ansible/modules/apt_repository.py b/lib/ansible/modules/apt_repository.py index 834bdec1ddf..06755d4db0c 100644 --- a/lib/ansible/modules/apt_repository.py +++ b/lib/ansible/modules/apt_repository.py @@ -406,6 +406,12 @@ class UbuntuSourcesList(SourcesList): self.codename = module.params['codename'] or distro.codename super(UbuntuSourcesList, self).__init__(module) + def __deepcopy__(self, memo=None): + return UbuntuSourcesList( + self.module, + add_ppa_signing_keys_callback=self.add_ppa_signing_keys_callback + ) + def _get_ppa_info(self, owner_name, ppa_name): lp_api = self.LP_API % (owner_name, ppa_name)