# Path: wifiphisher/common/constants.py
# DN = open(os.devnull, 'w')


from logging import getLogger
from subprocess import PIPE, Popen
from wifiphisher.common.constants import DN
"""Host common and generic functions.

Host all the common and generic functions that are used throughout
the project.

"""

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)



# pylint: disable=C0103
logger = getLogger(__name__)


def execute_commands(commands):
    """Execute each command and log any errors."""
    for command in commands:

# Path: wifiphisher/common/constants.py
# DN = open(os.devnull, 'w')


# Path: wifiphisher/common/utilities.py
from logging import getLogger
from subprocess import PIPE, Popen
from wifiphisher.common.constants import DN

"""Host common and generic functions.

Host all the common and generic functions that are used throughout
the project.

"""

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)



# pylint: disable=C0103
logger = getLogger(__name__)


def execute_commands(commands):
    """Execute each command and log any errors."""
    for command in commands:

        _, error = Popen(command.split(), stderr=PIPE, stdout=DN).communicate()