Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, opener, version):
appendopener.__init__(self, opener)
changelog.changelog.__init__(self, self, version)
def checkinlinesize(self, fp, tr):
for chunk in util.filechunkiter(ifp):
ofp.write(chunk)
ifp.close()
os.unlink(tmpname)
del self.tmpnames[name]
ofp.close()
def cleanup(self):
'''delete temp files (this discards unwritten data!)'''
for tmpname in self.tmpnames.values():
os.unlink(tmpname)
# files for changelog and manifest are in different appendopeners, so
# not mixed up together.
class appendchangelog(changelog.changelog, appendopener):
def __init__(self, opener, version):
appendopener.__init__(self, opener)
changelog.changelog.__init__(self, self, version)
def checkinlinesize(self, fp, tr):
return
class appendmanifest(manifest.manifest, appendopener):
def __init__(self, opener, version):
appendopener.__init__(self, opener)
manifest.manifest.__init__(self, self, version)
def checkinlinesize(self, fp, tr):
return