aws_info_helper/__init__.py
def find_all_pems():
    """Find all .pem files in ~/.ssh and return a dict with absolute paths"""
    found = []
    dirname = os.path.abspath(os.path.expanduser('~/.ssh'))
    for dirpath, dirnames, filenames in walk(dirname, topdown=True):
        found.extend([os.path.join(dirpath, f) for f in filenames if f.endswith('.pem')])
    return {
        os.path.basename(path).rsplit('.', 1)[0]: path
        for path in sorted(found)
    }
Find all .pem files in ~/.ssh and return a dict with absolute paths
Find all .pem files in ~/.ssh and return a dict with absolute paths
Find all . pem files in ~ / . ssh and return a dict with absolute paths
def find_all_pems():
    found = []
    dirname = os.path.abspath(os.path.expanduser('~/.ssh'))
    for dirpath, dirnames, filenames in walk(dirname, topdown=True):
        found.extend([os.path.join(dirpath, f) for f in filenames if f.endswith('.pem')])
    return {
        os.path.basename(path).rsplit('.', 1)[0]: path
        for path in sorted(found)
    }
def find_all_pems ( ) : found = [ ] dirname = os . path . abspath ( os . path . expanduser ( '~/.ssh' ) ) for dirpath , dirnames , filenames in walk ( dirname , topdown = True ) : found . extend ( [ os . path . join ( dirpath , f ) for f in filenames if f . endswith ( '.pem' ) ] ) return { os . path . basename ( path ) . rsplit ( '.' , 1 ) [ 0 ] : path for path in sorted ( found ) }
Find all .pem files in ~/.ssh and return a dict with absolute paths
Find all . pem files in ~ / . ssh and return a dict with absolute paths
"""Find all .pem files in ~/.ssh and return a dict with absolute paths"""