@@ -4319,7 +4319,7 @@ def AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt=False, fmtt
43194319 outvar = fp .read ()
43204320 fp .close ()
43214321 return outvar
4322- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
4322+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
43234323 fp = CompressOpenFileAlt (
43244324 fp , compression , compressionlevel , formatspecs )
43254325 fp .seek (0 , 0 )
@@ -4399,7 +4399,7 @@ def AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt=False, fmtty
43994399 outvar = fp .read ()
44004400 fp .close ()
44014401 return outvar
4402- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
4402+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
44034403 fp = CompressOpenFileAlt (
44044404 fp , compression , compressionlevel , formatspecs )
44054405 fp .seek (0 , 0 )
@@ -5681,7 +5681,7 @@ def PackCatFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compress
56815681 outvar = fp .read ()
56825682 fp .close ()
56835683 return outvar
5684- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
5684+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
56855685 fp = CompressOpenFileAlt (
56865686 fp , compression , compressionlevel , formatspecs )
56875687 fp .seek (0 , 0 )
@@ -5987,7 +5987,7 @@ def PackCatFileFromTarFile(infile, outfile, fmttype="auto", compression="auto",
59875987 outvar = fp .read ()
59885988 fp .close ()
59895989 return outvar
5990- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
5990+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
59915991 fp = CompressOpenFileAlt (
59925992 fp , compression , compressionlevel , formatspecs )
59935993 fp .seek (0 , 0 )
@@ -6278,7 +6278,7 @@ def PackCatFileFromZipFile(infile, outfile, fmttype="auto", compression="auto",
62786278 outvar = fp .read ()
62796279 fp .close ()
62806280 return outvar
6281- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
6281+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
62826282 fp = CompressOpenFileAlt (
62836283 fp , compression , compressionlevel , formatspecs )
62846284 fp .seek (0 , 0 )
@@ -6598,7 +6598,7 @@ def PackCatFileFromRarFile(infile, outfile, fmttype="auto", compression="auto",
65986598 outvar = fp .read ()
65996599 fp .close ()
66006600 return outvar
6601- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
6601+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
66026602 fp = CompressOpenFileAlt (
66036603 fp , compression , compressionlevel , formatspecs )
66046604 fp .seek (0 , 0 )
@@ -6851,7 +6851,7 @@ def PackCatFileFromSevenZipFile(infile, outfile, fmttype="auto", compression="au
68516851 outvar = fp .read ()
68526852 fp .close ()
68536853 return outvar
6854- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
6854+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
68556855 fp = CompressOpenFileAlt (
68566856 fp , compression , compressionlevel , formatspecs )
68576857 fp .seek (0 , 0 )
@@ -8711,7 +8711,7 @@ def RePackCatFile(infile, outfile, fmttype="auto", compression="auto", compressw
87118711 outvar = fp .read ()
87128712 fp .close ()
87138713 return outvar
8714- elif (re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
8714+ elif (( not hasattr ( outfile , "read" ) and not hasattr ( outfile , "write" )) and re .findall ("^(ftp|ftps|sftp):\\ /\\ /" , outfile )):
87158715 fp = CompressOpenFileAlt (
87168716 fp , compression , compressionlevel , formatspecs )
87178717 fp .seek (0 , 0 )
0 commit comments