comparison files.py @ 54:1914ae9cfdce

Bug fixes
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 20 Dec 2010 22:44:34 +0200
parents 4ea7133ac25c
children cd347cfca272
comparison
equal deleted inserted replaced
53:394aec9712b6 54:1914ae9cfdce
239 if hasattr(file, '__exit__'): 239 if hasattr(file, '__exit__'):
240 return file 240 return file
241 else: 241 else:
242 return contextlib.closing(file) 242 return contextlib.closing(file)
243 else: 243 else:
244 return open(self.real_path) 244 return open(self.real_path, 'rU')
245 245
246 def copy(self, target): 246 def copy(self, target):
247 if self.archive: 247 if self.archive:
248 self.archive.extract(self.real_path, target) 248 self.archive.extract(self.real_path, target)
249 else: 249 else: