Completed
Push — master ( 0d56a8...9e1177 )
by Jasper
10s
created

niprov.Result   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %
Metric Value
dl 0
loc 5
rs 10
wmc 1
1
#!/usr/bin/python
2
# -*- coding: UTF-8 -*-
3
import subprocess
4
5
class Externals(object):
6
    """Utility that wraps the python subprocess module to start other applications
7
    """
8
9
    def run(self, command):
10
        """Start a subprocess with the command provided.
11
12
        Args:
13
            command (list): A list of command elements.
14
        """
15
        output = subprocess.check_output(command)
16
        return Result(True, output)
17
18
19
class Result(object):
20
21
    def __init__(self, succesful, output):
22
        self.succesful = succesful
23
        self.output = output
24