def get_specs(path=None):
    'Load specs form default locations and then update from specs in given\n    path if specified.\n\n    :param path: optional path to an additional spec file\n    '

    def load_json(jf):
        with open(jf) as of:
            try:
                data = json.load(of)
            except ValueError:
                log.error('Malformed json file %s', jf)
                raise jip.ValidationError('jip.profiles', ('Malformed json file %s' % jf))
        return data
    global specs
    cwd = os.path.join(os.getcwd(), 'jip.specs')
    home = os.path.join(os.getenv('HOME', ''), '.jip/jip.specs')
    specs = {}
    if os.path.exists(home):
        specs = _update(specs, load_json(home))
    if os.path.exists(cwd):
        specs = _update(specs, load_json(cwd))
    if (path and os.path.exists(path)):
        specs = _update(specs, load_json(path))
    return specs
Load specs form default locations and then update from specs in given
path if specified.

:param path: optional path to an additional spec file
def get_specs(path=None):
    'Load specs form default locations and then update from specs in given\n    path if specified.\n\n    :param path: optional path to an additional spec file\n    '

    def load_json(jf):
        with open(jf) as of:
            try:
                data = json.load(of)
            except ValueError:
                log.error('Malformed json file %s', jf)
                raise jip.ValidationError('jip.profiles', ('Malformed json file %s' % jf))
        return data
    global specs
    cwd = os.path.join(os.getcwd(), 'jip.specs')
    home = os.path.join(os.getenv('HOME', ), '.jip/jip.specs')
    specs = {}
    if os.path.exists(home):
        specs = _update(specs, load_json(home))
    if os.path.exists(cwd):
        specs = _update(specs, load_json(cwd))
    if (path and os.path.exists(path)):
        specs = _update(specs, load_json(path))
    return specs