def prepend_home_dir(filename):
    """
    Prepends the home directory to the given filename if it doesn't
    already contain some kind of directory path.
    """
    return os.path.join(os.environ['HOME'], '.ssh', filename) if '/' not in filename else filename
dataset/ETHPy150Open praekelt/python-sshtail/sshtail/utils.py/prepend_home_dir/original