1553 if not self.user: |
1553 if not self.user: |
1554 return (s, None) |
1554 return (s, None) |
1555 return (s, (None, (str(self), self.host), |
1555 return (s, (None, (str(self), self.host), |
1556 self.user, self.passwd or '')) |
1556 self.user, self.passwd or '')) |
1557 |
1557 |
|
1558 def isabs(self): |
|
1559 if self.scheme and self.scheme != 'file': |
|
1560 return True # remote URL |
|
1561 if hasdriveletter(self.path): |
|
1562 return True # absolute for our purposes - can't be joined() |
|
1563 if self.path.startswith(r'\\'): |
|
1564 return True # Windows UNC path |
|
1565 if self.path.startswith('/'): |
|
1566 return True # POSIX-style |
|
1567 return False |
|
1568 |
1558 def localpath(self): |
1569 def localpath(self): |
1559 if self.scheme == 'file' or self.scheme == 'bundle': |
1570 if self.scheme == 'file' or self.scheme == 'bundle': |
1560 path = self.path or '/' |
1571 path = self.path or '/' |
1561 # For Windows, we need to promote hosts containing drive |
1572 # For Windows, we need to promote hosts containing drive |
1562 # letters to paths with drive letters. |
1573 # letters to paths with drive letters. |