From 450061afa79843c7bf9c33dd7abc23ec0913cc4e Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Wed, 4 Oct 2023 18:40:31 -0700 Subject: [PATCH] Remove usage of name member Following osrf/ghrocker#245 --- src/ghrocker/ghpages_extension.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ghrocker/ghpages_extension.py b/src/ghrocker/ghpages_extension.py index 6b42b6c..bcc06b8 100644 --- a/src/ghrocker/ghpages_extension.py +++ b/src/ghrocker/ghpages_extension.py @@ -24,11 +24,9 @@ class GHPages(RockerExtension): - name = 'ghpages' - - @classmethod - def get_name(cls): - return cls.name + @staticmethod + def get_name(): + return 'ghpages' def precondition_environment(self, cli_args): pass @@ -40,7 +38,7 @@ def get_preamble(self, cli_args): return '' def get_snippet(self, cliargs): - snippet = pkgutil.get_data('ghrocker', 'templates/%s_snippet.Dockerfile.em' % self.name).decode('utf-8') + snippet = pkgutil.get_data('ghrocker', 'templates/%s_snippet.Dockerfile.em' % self.get_name()).decode('utf-8') return em.expand(snippet, {}) def get_docker_args(self, cli_args):