Completed
Push — master ( 88297e...da08ae )
by Jerome
35s
created

Project.__init__()   B

Complexity

Conditions 5

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 5
c 2
b 0
f 0
dl 0
loc 11
rs 8.5454
1
from zipfile import ZipFile
2
3
4
class Project(object):
5
    def __init__(self, path=None, stack=None,*args):
6
7
        # Project already exists
8
        if path is None or len(path) == 0:
9
            raise FileNotFoundError
10
        else:
11
            with ZipFile(path) as project_folder:
12
                with project_folder.open("state.yml") as state:
13
                    pass
14
        self.path = path
15
        self.stack = stack
16
17
18
class FileNotFoundError(IOError):
19
    pass
20