# Path: elbepack/dbaction.py
# class DbAction:
# 
#     actiondict = {}
# 
#     @classmethod
#     def register(cls, action):
#         cls.actiondict[action.tag] = action
# 
#     @classmethod
#     def print_actions(cls):
#         print("available actions are:")
#         for a in cls.actiondict:
#             print("   %s" % a)
# 
#     def __new__(cls, node):
#         action = cls.actiondict[node]
#         return object.__new__(action)
# 
#     def __init__(self, node):
#         self.node = node
# 
#     def execute(self, _args):
#         raise NotImplementedError('execute() not implemented')


from elbepack.dbaction import DbAction
# ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2014, 2017 Manuel Traut <manut@linutronix.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later



def run_command(argv):

    if not argv:
        print("elbe db - no action given")
        DbAction.print_actions()
        return

    try:

# Path: elbepack/dbaction.py
# class DbAction:
# 
#     actiondict = {}
# 
#     @classmethod
#     def register(cls, action):
#         cls.actiondict[action.tag] = action
# 
#     @classmethod
#     def print_actions(cls):
#         print("available actions are:")
#         for a in cls.actiondict:
#             print("   %s" % a)
# 
#     def __new__(cls, node):
#         action = cls.actiondict[node]
#         return object.__new__(action)
# 
#     def __init__(self, node):
#         self.node = node
# 
#     def execute(self, _args):
#         raise NotImplementedError('execute() not implemented')


# Path: elbepack/commands/db.py
from elbepack.dbaction import DbAction

# ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2014, 2017 Manuel Traut <manut@linutronix.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later



def run_command(argv):

    if not argv:
        print("elbe db - no action given")
        DbAction.print_actions()
        return

    try:

        DbAction(argv[0]).execute(argv[1:])