Commits

Mathieu Comandon committed 0c7700a

Fix for FTPStorageFile close() method

  • Participants
  • Parent commits 3a02c7a

Comments (0)

Files changed (1)

storages/backends/ftp.py

     def close(self):
         if self._is_dirty:
             self._storage._start_connection()
-            self._storage._put_file(self._name, self.file.getvalue())
-            self._storage._end_connection()
+            self._storage._put_file(self._name, self)
+            self._storage.disconnect()
         self.file.close()