Skip to content

Commit c165c81

Browse files
authored
Merge pull request #5919 from DIRACGridBot/cherry-pick-2-13d0b437c-integration
[sweep:integration] feat (GFAL2): redefine ECOMM in case it is not in errno
2 parents 3476d79 + b46bc90 commit c165c81

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/DIRAC/Resources/Storage/GFAL2_StorageBase.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@
3939
from DIRAC.Core.Utilities.File import getSize
4040
from DIRAC.Core.Utilities.Pfn import pfnparse, pfnunparse
4141

42+
# MacOS does not know ECOMM...
43+
try:
44+
ECOMM = errno.ECOMM
45+
except AttributeError:
46+
ECOMM = 70
47+
4248

4349
class GFAL2_StorageBase(StorageBase):
4450
""".. class:: GFAL2_StorageBase
@@ -1118,7 +1124,7 @@ def _createSingleDirectory(self, path):
11181124
# encounter ECOMM when creating an existing directory
11191125
# This will be fixed in the future versions of DPM,
11201126
# but in the meantime, we catch it ourselves.
1121-
if e.code in (errno.EEXIST, errno.ECOMM):
1127+
if e.code in (errno.EEXIST, ECOMM):
11221128
log.debug("Directory already exists")
11231129
return S_OK()
11241130
# any other error: failed to create directory

0 commit comments

Comments
 (0)