e93f4d4dcd70fc3eaf87779fc9f0b34f98e04ac8,lib/prody/utilities/pathtools.py,,gunzip,#Any#Any#,81

Before Change


    *filename* is used as the output name.  Returns output filename upon 
    successful completion.

    if not isinstance(filename, str):
        raise TypeError("filename must be a string")
    if not isfile(filename):
        raise ValueError("{0:s} does not exist".format(filename))
    if outname is None:
        if filename.endswith(".gz"):
            outname = filename[:-3]
        elif filename.endswith(".tgz"):

After Change


        from StringIO import StringIO
        buff = gzip.GzipFile(fileobj=StringIO(filename))
        if outname is None:
            try:
                return buff.read()
            except IOError:
                raise ValueError("filename is not a valid path or a compressed"
                                 " string buffer")
        else:
            with open(outname, "w") as out: 
                out.write(buff.read())
            return outname
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: prody/ProDy
Commit Name: e93f4d4dcd70fc3eaf87779fc9f0b34f98e04ac8
Time: 2012-10-17
Author: lordnapi@gmail.com
File Name: lib/prody/utilities/pathtools.py
Class Name:
Method Name: gunzip


Project Name: prody/ProDy
Commit Name: 86ce7f9e7db046d0bbf2a4aef50cabd4731167e6
Time: 2018-04-30
Author: shz66@pitt.edu
File Name: prody/utilities/catchall.py
Class Name:
Method Name: reorderMatrix


Project Name: prody/ProDy
Commit Name: c5b11b7668df61c3a5c3f927625430c56413d5fb
Time: 2012-11-14
Author: lordnapi@gmail.com
File Name: lib/prody/utilities/pathtools.py
Class Name:
Method Name: openFile