_is_loopback. Internal helper function. This docstring was added automatically to improve maintainability. Args: ip: Parameter. Returns: Varies.
(ip: str)
| 3585 | p = os.path.join(STORAGE_DIR, username) |
| 3586 | os.makedirs(p, exist_ok=True) |
| 3587 | return p |
| 3588 | |
| 3589 | def safe_relpath(p: str) -> str: |
| 3590 | """safe_relpath. |
| 3591 | |
| 3592 | Internal helper function. |
| 3593 | |
| 3594 | This docstring was added automatically to improve maintainability. |
| 3595 | |
| 3596 | Args: |
| 3597 | p: Parameter. |
| 3598 | |
| 3599 | Returns: |
| 3600 | Varies. |
| 3601 | """ |
| 3602 | p = (p or "").replace("\\", "/").strip() |
| 3603 | if p in ("", ".", "/"): |
| 3604 | return "" |
no outgoing calls
no test coverage detected