Raise ValueError when HTML file already exists.
This commit is contained in:
parent
1a0cd1ee6b
commit
419ae5fbcf
1 changed files with 2 additions and 1 deletions
|
@ -108,7 +108,8 @@ class HtmlEventHandler(EventHandler):
|
||||||
tomorrow = time.localtime(tomorrow)
|
tomorrow = time.localtime(tomorrow)
|
||||||
|
|
||||||
fn = self.fnFromDate(today)
|
fn = self.fnFromDate(today)
|
||||||
assert not os.path.exists(fn), 'Comic page for today already exists!'
|
if os.path.exists(fn):
|
||||||
|
raise ValueError('output file %r already exists' % fn)
|
||||||
|
|
||||||
d = os.path.dirname(fn)
|
d = os.path.dirname(fn)
|
||||||
if not os.path.isdir(d):
|
if not os.path.isdir(d):
|
||||||
|
|
Loading…
Reference in a new issue