On Sat, 2010-12-04 at 13:39 +0100, Adrian Buehlmann wrote: > try: > if 'w' in mode: > - st_mode = os.lstat(f).st_mode & 0777 > + if not resetflags: > + st_mode = os.lstat(f).st_mode & 0777 When do we not want to reset the mode on write? -- Mathematics is the supreme nostalgia of our time.