diff --git a/salt/fileclient.py b/salt/fileclient.py index 3c5a0ebffa3e..377f16b48f53 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -1030,7 +1030,13 @@ def destroy(self): return self._closing = True - self.channel.close() + channel = None + try: + channel = self.channel + except AttributeError: + pass + if channel is not None: + channel.close() def get_file(self, path,