# internal helper function
def rename(self, filename):
tempfilename = filename + '.new'
- os.chmod(tempfilename, 0664)
+ os.chmod(tempfilename, 0o664)
os.rename(tempfilename, filename)
def close(self):
'''
self.file.close()
if self.gzip:
- check_call('gzip --rsyncable <%s.new >%s.gz.new' % (self.path, self.path),
+ check_call('gzip -9cn --rsyncable <%s.new >%s.gz.new' % (self.path, self.path),
shell = True)
self.rename('%s.gz' % self.path)
if self.bzip2:
- check_call('bzip2 <%s.new >%s.bz2.new' % (self.path, self.path), shell = True)
+ check_call('bzip2 -9 <%s.new >%s.bz2.new' % (self.path, self.path), shell = True)
self.rename('%s.bz2' % self.path)
if self.uncompressed:
self.rename(self.path)