Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Update test_transfer_ftp_true.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Sep 21, 2019
1 parent 4f42aec commit 2bffa46
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _unittests/ut_filehelper/test_transfer_ftp_true.py
Expand Up @@ -9,6 +9,7 @@
import warnings
import datetime
import ftplib
import socket

from pyquickhelper.loghelper import fLOG
from pyquickhelper.filehelper import TransferFTP, FolderTransferFTP, FileTreeNode
Expand Down Expand Up @@ -50,6 +51,9 @@ def test_transfer_ftp_true(self):
except ftplib.error_temp as e:
if "421 Home directory not available" in str(e):
return
except socket.gaierror as ee:
if "Name or service not known" in str(ee):
return
r = web.ls(".")
fLOG(r)
self.assertTrue(isinstance(r, list))
Expand Down Expand Up @@ -94,6 +98,9 @@ def test_transfer_ftp_start_transfering(self):
except ftplib.error_temp as e:
if "421 Home directory not available" in str(e):
return
except socket.gaierror as ee:
if "Name or service not known" in str(ee):
return

web = FolderTransferFTP(ftn, ftp, sfile,
root_web="/www/htdocs/apptest/",
Expand Down

0 comments on commit 2bffa46

Please sign in to comment.