(baseURL, path, key)
| 635 | |
| 636 | |
| 637 | def getURL(baseURL, path, key): |
| 638 | if key.startswith('http://') or key.startswith('https://'): # external server |
| 639 | URL = key |
| 640 | elif key.startswith('/'): # internal full path. |
| 641 | URL = baseURL + key |
| 642 | elif key == '': # internal path |
| 643 | URL = baseURL + path |
| 644 | else: # internal path, add-on |
| 645 | URL = baseURL + path + '/' + key |
| 646 | |
| 647 | return URL |
| 648 | |
| 649 | |
| 650 |
no outgoing calls
no test coverage detected