summaryrefslogtreecommitdiffstats
path: root/gallery_dl/exception.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-01-25 20:10:48 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2022-01-25 20:10:48 -0500
commit8a812de1450d5d53fc1cd9a59f6c3f08452fc5b1 (patch)
tree8dc998621e167fb99f5e743857d8495daac2f6cd /gallery_dl/exception.py
parent8de58070ee3e55f29966a787fd618632dbf4309b (diff)
New upstream version 1.20.3.upstream/1.20.3
Diffstat (limited to 'gallery_dl/exception.py')
-rw-r--r--gallery_dl/exception.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gallery_dl/exception.py b/gallery_dl/exception.py
index 0433dc9..5120039 100644
--- a/gallery_dl/exception.py
+++ b/gallery_dl/exception.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2015-2021 Mike Fährmann
+# Copyright 2015-2022 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -33,12 +33,12 @@ class GalleryDLException(Exception):
msgfmt = None
code = 1
- def __init__(self, message=None):
+ def __init__(self, message=None, fmt=True):
if not message:
message = self.default
elif isinstance(message, Exception):
message = "{}: {}".format(message.__class__.__name__, message)
- if self.msgfmt:
+ if self.msgfmt and fmt:
message = self.msgfmt.format(message)
Exception.__init__(self, message)