Source

rope_py3k / rope / base / resources.py

Diff from to

File rope/base/resources.py

             raise exceptions.ModuleDecodeError(self.path, e.reason)
 
     def read_bytes(self):
-        return open(self.real_path, 'rb').read()
+        with open(self.real_path, 'rb') as fi:
+            return fi.read()
 
     def write(self, contents):
         try: