Stefan Schwarzer committed e634dcf

Use `self.__class__` instead of `FTPHost` for easier mock testing.

Comments (0)

Files changed (1)


-# Copyright (C) 2002-2011, Stefan Schwarzer <>
+# Copyright (C) 2002-2012, Stefan Schwarzer <>
 # Copyright (C) 2008, Roger Demetrescu <>
 # See the file LICENSE for licensing terms.
         """Return a copy of this `FTPHost` object."""
         # The copy includes a new session factory return value (aka
         #  session) but doesn't copy the state of `self.getcwd()`.
-        return FTPHost(*self._args, **self._kwargs)
+        return self.__class__(*self._args, **self._kwargs)
     def _available_child(self):