508ea4c20f4672707d2ffc007f1dfc869eb1872f,pysos/target.py,FileTarget,mtime,#FileTarget#,142

Before Change


        return os.path.getsize(self._filename)
    
    def mtime(self):
        return os.path.getmtime(self._filename)

    def sig_file(self):
        if self._sig_file is not None:
            return self._sig_file

After Change


            raise RuntimeError("{} or its signature does not exist.".format(self._filename))
    
    def mtime(self):
        if os.path.isfile(self._filename):
            return os.path.getmtime(self.fullname())
        elif os.path.isfile(self.sig_file()):
            with open(self.sig_file()) as md5:
                line = md5.readline()
                _, t, _, _ = line.rsplit("\t", 3)
                return t.strip()
        else:
            raise RuntimeError("{} or its signature does not exist.".format(self._filename))

    def sig_file(self):
        if self._sig_file is not None:
            return self._sig_file
        // If the output path is outside of the current working directory
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: vatlab/SoS
Commit Name: 508ea4c20f4672707d2ffc007f1dfc869eb1872f
Time: 2016-10-31
Author: ben.bog@gmail.com
File Name: pysos/target.py
Class Name: FileTarget
Method Name: mtime


Project Name: mozilla/mozregression
Commit Name: 781363ed1e4397645494d07ce45f3e2ad0d766d6
Time: 2015-10-21
Author: j.parkouss@gmail.com
File Name: mozregression/network.py
Class Name:
Method Name: url_links


Project Name: vatlab/SoS
Commit Name: 508ea4c20f4672707d2ffc007f1dfc869eb1872f
Time: 2016-10-31
Author: ben.bog@gmail.com
File Name: pysos/target.py
Class Name: FileTarget
Method Name: size