GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Configure.read_config()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 3
1
import yaml
2
3
4
class Configure(object):
5
    def __init__(self):
6
        self.__config = None
7
8
    def get_config(self):
9
        return self.__config
10
11
    def read_config(self, file_name='config.yaml'):
12
        with open(file_name, 'r') as stream:
13
            try:
14
                self.__config = yaml.load(stream)
15
                return True
16
            except yaml.YAMLError:
17
                #todo write error message to log/display
18
                pass
19
20
        return False
21
22
    def set_config(self):
23
        self.__config = None
24
25