diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-17 22:28:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-17 22:28:22 +0000 |
commit | a8ed7fce3610db9bf7f3bc9c977c627435fc6958 (patch) | |
tree | 3a0c6e65d1164c8bf179602896aa2b99e515c525 | |
parent | 60d880a7f72e9d8dcf60986d43a767db3dcf0722 (diff) | |
parent | 379523bd09e4bbd9f475d316cddea0cb154a906b (diff) | |
download | zuul-a8ed7fce3610db9bf7f3bc9c977c627435fc6958.tar.gz |
Merge "Make ZuulDaemonApp an abstract base class" into feature/zuulv3
-rwxr-xr-x | zuul/cmd/__init__.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py index 6d1f8625f..b2992195c 100755 --- a/zuul/cmd/__init__.py +++ b/zuul/cmd/__init__.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +import abc import argparse import configparser import daemon @@ -156,7 +157,7 @@ class ZuulApp(object): self.connections.configure(self.config, source_only) -class ZuulDaemonApp(ZuulApp): +class ZuulDaemonApp(ZuulApp, metaclass=abc.ABCMeta): def createParser(self): parser = super(ZuulDaemonApp, self).createParser() parser.add_argument('-d', dest='nodaemon', action='store_true', @@ -169,6 +170,13 @@ class ZuulDaemonApp(ZuulApp): expand_user=True) return pid_fn + @abc.abstractmethod + def run(self): + """ + This is the main run method of the application. + """ + pass + def main(self): self.parseArguments() self.readConfig() |