def accounts():
    """Load the accounts YAML file and return a dict """
    import yaml

    for path in account_files:
        try:

            c_dir = os.path.dirname(path)

            if not os.path.exists(c_dir):
                os.makedirs(c_dir)

            with open(path, 'rb') as f:
                return yaml.load(f)['accounts']

        except (OSError, IOError) as e:
            pass

    return {}
def accounts ( ) : import yaml for path in account_files : try : c_dir = os . path . dirname ( path ) if not os . path . exists ( c_dir ) : os . makedirs ( c_dir ) with open ( path , 'rb' ) as f : return yaml . load ( f ) [ 'accounts' ] except ( OSError , IOError ) as e : pass return { }
Load the accounts YAML file and return a dict