Skip to content

Commit 763b72a

Browse files
committed
1 parent a548951 commit 763b72a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/generic/filesystem.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ def _checkFileLength(self, localFile, remoteFile, fileRead=False):
5252

5353
lengthQuery = "SELECT DATALENGTH(%s) FROM %s" % (self.tblField, self.fileTblName)
5454

55-
localFileSize = os.path.getsize(localFile)
55+
try:
56+
localFileSize = os.path.getsize(localFile)
57+
except OSError:
58+
warnMsg = "file '%s' is missing" % localFile
59+
logger.warn(warnMsg)
60+
localFileSize = 0
5661

5762
if fileRead and Backend.isDbms(DBMS.PGSQL):
5863
logger.info("length of read file '%s' cannot be checked on PostgreSQL" % remoteFile)

0 commit comments

Comments
 (0)