Skip to content

Commit 30e8126

Browse files
committed
Use pathlib2 exclusively
Don't use pathlib library
1 parent bb84cee commit 30e8126

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

cwltool/load_tool.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
import logging
77
import re
88
import urlparse
9-
try:
10-
import pathlib # type: ignore
11-
except:
12-
import pathlib2 as pathlib # type: ignore
9+
import pathlib2
1310

1411
from typing import Any, AnyStr, Callable, cast, Dict, Text, Tuple, Union
1512
from ruamel.yaml.comments import CommentedSeq, CommentedMap
@@ -47,7 +44,7 @@ def fetch_document(argsworkflow, # type: Union[Text, dict[Text, Any]]
4744
if split.scheme:
4845
uri = argsworkflow
4946
elif os.path.exists(os.path.abspath(argsworkflow)):
50-
uri = pathlib.Path(os.path.abspath(argsworkflow)).as_uri()
47+
uri = pathlib2.Path(os.path.abspath(argsworkflow)).as_uri()
5148
elif resolver:
5249
uri = resolver(document_loader, argsworkflow)
5350

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ shellescape==3.4.1
66
schema-salad>=2.1.20161216210732,<3
77
cwltest>=1.0.20160907111242
88
typing==3.5.2.2 ; python_version>="2.7"
9-
pathlib2==2.1.0 ; python_version<"3.4"
9+
pathlib2==2.1.0

0 commit comments

Comments
 (0)