Skip to content

Commit 59d90e2

Browse files
committed
fix pathlib2 import
1 parent 9ee5b89 commit 59d90e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/collective/exportimport/import_content.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from DateTime import DateTime
88
from datetime import timedelta
99
from Persistence import PersistentMapping
10-
from pathlib import Path
1110
from plone import api
1211
from plone.api.exc import InvalidParameterError
1312
from plone.dexterity.interfaces import IDexterityFTI
@@ -44,6 +43,11 @@
4443
except ImportError:
4544
HAS_COLLECTION_FIX = False
4645

46+
if six.PY2:
47+
from pathlib2 import Path
48+
else:
49+
from pathlib import Path
50+
4751
logger = logging.getLogger(__name__)
4852
BLOB_HOME = os.getenv("COLLECTIVE_EXPORTIMPORT_BLOB_HOME", "")
4953

0 commit comments

Comments
 (0)