def untar(fname):
    if fname.endswith('tar.gz'):
        with tarfile.open(fname) as tf:
            tf.extractall()
    else:
        print('Not a tar.gz file: {}'.format(fname))
def untar(fname):
    if fname.endswith('tar.gz'):
        with tarfile.open(fname) as tf:
            tf.extractall()
    else:
        print('Not a tar.gz file: {}'.format(fname))