Skip to content

Commit aea8e89

Browse files
add overrideException arg to loadContent
1 parent 8a07bc3 commit aea8e89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/PyWSGIRef/loadContent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
from .exceptions import *
77
from .finished import finished
88

9-
def loadFromWeb(url: str) -> str:
9+
def loadFromWeb(url: str, overrideException: bool = False) -> str:
1010
"""
1111
Loads content from the given URL with the given data.
12+
Overrides ServerAlreadyGeneratedError if overrideException is True.
1213
"""
13-
if finished.value:
14+
if finished.value and not overrideException:
1415
raise ServerAlreadyGeneratedError()
1516
if not url.endswith(".pyhtml"):
1617
raise InvalidFiletypeError()

0 commit comments

Comments
 (0)