Skip to content

Commit 118a6e7

Browse files
committed
squashme: windows substring
1 parent cad7761 commit 118a6e7

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

cumulusci/utils/fileutils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def load_from_source(source: DataInput) -> ContextManager[Tuple[IO[Text], Text]]
8585
yield f, path
8686
elif "://" in source: # URL string-like
8787
url = source
88-
resp = requests.get(url)
88+
resp = requests.get(url, timeout=30)
8989
resp.raise_for_status()
9090
yield StringIO(resp.text), url
9191
else: # path-string-like
@@ -261,7 +261,7 @@ def mkdir(self, *, parents=False, exist_ok=False):
261261
p.mkdir(exist_ok=exist_ok)
262262

263263
def __contains__(self, other):
264-
return other in str(self.geturl())
264+
return str(other) in str(self.getsyspath())
265265

266266
@property
267267
def suffix(self):
@@ -274,10 +274,7 @@ def __repr__(self):
274274
return f"<FSResource {self.geturl()}>"
275275

276276
def __str__(self):
277-
rc = self.geturl()
278-
if rc.startswith("file://"):
279-
return rc[7:] if rc.startswith("file:///") else rc[6:]
280-
return rc
277+
return str(self.getsyspath())
281278

282279
def __fspath__(self):
283280
return str(self.getsyspath())

0 commit comments

Comments
 (0)