Manage packages in queue

def pkg_queue(self):
        """Manage packages in queue
        """
        queue = QueuePkgs()
        options = [
            "-q",
            "--queue"
        ]
        flag = [
            "--add",
            "--remove"
        ]
        command = [
            "list",
            "build",
            "install",
            "build-install"
        ]
        if (len(self.args) > 2 and self.args[0] in options and
                flag[0] in self.args):
            self.args.remove(flag[0])
            queue.add(self.args[1:])
        elif (len(self.args) == 3 and self.args[0] in options and
                "ALL" in self.args and flag[1] in self.args):
            self.args.remove(flag[1])
            queue.remove(queue.packages())
        elif (len(self.args) > 2 and self.args[0] in options and
                flag[1] in self.args):
            self.args.remove(flag[1])
            queue.remove(self.args[1:])
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == command[0]):
            queue.listed()
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == command[1]):
            queue.build()
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == command[2]):
            queue.install()
        elif (len(self.args) == 2 and self.args[0] in options and
                self.args[1] == command[3]):
            queue.build()
            queue.install()
        else:
            usage("")