[elbe-devel] [PATCH 10/10] elbepack: dbaction: drop unnecessary constructors
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Apr 22 18:37:31 CEST 2024
The explicit constructors do the same as the implicit ones.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/dbaction.py | 48 ------------------------------------------------
1 file changed, 48 deletions(-)
diff --git a/elbepack/dbaction.py b/elbepack/dbaction.py
index 12deac198a34..b7da9f218cbb 100644
--- a/elbepack/dbaction.py
+++ b/elbepack/dbaction.py
@@ -38,9 +38,6 @@ class DbAction:
class InitAction(DbAction):
tag = 'init'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(usage='usage: %prog db init [options]')
oparser.add_option('--name', dest='name', default='root')
@@ -62,9 +59,6 @@ DbAction.register(InitAction)
class AddUserAction(DbAction):
tag = 'add_user'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(
usage='usage: %prog db add_user [options] <username>')
@@ -96,9 +90,6 @@ DbAction.register(AddUserAction)
class DelUserAction(DbAction):
tag = 'del_user'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(
usage='usage: %prog db del_user [options] <userid>')
@@ -147,9 +138,6 @@ class ListProjectsAction(DbAction):
tag = 'list_projects'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, _args):
db = ElbeDB()
projects = db.list_projects()
@@ -165,9 +153,6 @@ class ListUsersAction(DbAction):
tag = 'list_users'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, _args):
db = ElbeDB()
users = db.list_users()
@@ -183,9 +168,6 @@ class CreateProjectAction(DbAction):
tag = 'create_project'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(
usage='usage: %prog db create_project [options] <project_dir>')
@@ -209,9 +191,6 @@ class DeleteProjectAction(DbAction):
tag = 'del_project'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 1:
print('usage: elbe db del_project <project_dir>')
@@ -228,9 +207,6 @@ class SetXmlAction(DbAction):
tag = 'set_xml'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 2:
print('usage: elbe db set_xml <project_dir> <xml>')
@@ -247,9 +223,6 @@ class BuildAction(DbAction):
tag = 'build'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 1:
print('usage: elbe db build <project_dir>')
@@ -277,9 +250,6 @@ class GetFilesAction(DbAction):
tag = 'get_files'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 1:
print('usage: elbe db get_files <project_dir>')
@@ -301,9 +271,6 @@ class ResetProjectAction(DbAction):
tag = 'reset_project'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(
usage='usage: %prog db reset_project [options] <project_dir>')
@@ -328,9 +295,6 @@ class SetProjectVersionAction(DbAction):
tag = 'set_project_version'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 2:
print('usage: elbe db set_project_version <project_dir> <version>')
@@ -347,9 +311,6 @@ class ListVersionsAction(DbAction):
tag = 'list_versions'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 1:
print('usage: elbe db list_versions <project_dir>')
@@ -372,9 +333,6 @@ class SaveVersionAction(DbAction):
tag = 'save_version'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
oparser = OptionParser(
usage='usage: %prog db save_version <project_dir>')
@@ -398,9 +356,6 @@ class DelVersionAction(DbAction):
tag = 'del_version'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 2:
print('usage: elbe db del_version <project_dir> <version>')
@@ -417,9 +372,6 @@ class PrintVersionXMLAction(DbAction):
tag = 'print_version_xml'
- def __init__(self, node):
- DbAction.__init__(self, node)
-
def execute(self, args):
if len(args) != 2:
print('usage: elbe db print_version_xml <project_dir> <version>')
--
2.44.0
More information about the elbe-devel
mailing list