'Add lazy patch'

def add_patch(self, filename, patch, line_no):

    if (filename not in self.source_files):
        with open(filename) as f:
            self.source_files[filename] = self._quote(f.read())
    patch_id = uuidutils.generate_uuid()
    if (not patch.endswith('\n')):
        patch += '\n'
    self.patches[patch_id] = self._quote(patch)
    lines = self.source_files[filename].split(self._quote('\n'))
    lines[(line_no - 1)] = ''.join((('{%s:s}' % patch_id), lines[(line_no - 1)]))
    self.source_files[filename] = self._quote('\n').join(lines)
