def save(self):
if not self.dirty:<EOL><INDENT>return<EOL><DEDENT>data = '<STR_LIT:\n>'.join(map(self.make_relative,self.paths))<EOL>if data:<EOL><INDENT>log.debug("<STR_LIT>", self.filename)<EOL>data = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>) % data<EOL>if os.path.islink(self.filename):<EOL><INDENT>os.unlink(self.filename)<EOL><DEDENT>f = open(self.filename,'<STR_LIT>')<EOL>f.write(data); f.close()<EOL><DEDENT>elif os.path.exists(self.filename):<EOL><INDENT>log.debug("<STR_LIT>", self.filename)<EOL>os.unlink(self.filename)<EOL><DEDENT>self.dirty = False<EOL>
Write changed .pth file back to disk