Module: check_mk
Branch: master
Commit: f7876adc5eae0c5dae9e1e557dc3dcfd801c5615
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f7876adc5eae0c…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue May 17 15:33:34 2016 +0200
3534 FIX Fixed exception with upload of interlaced PNG files
The upload of interlaced PNG files is not supported with older versions (<1.1.7)
of the python PIL module.
---
.werks/3534 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 7 ++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/3534 b/.werks/3534
new file mode 100644
index 0000000..658b2e7
--- /dev/null
+++ b/.werks/3534
@@ -0,0 +1,10 @@
+Title: Fixed exception with upload of interlaced PNG files
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.9i1
+Date: 1463491935
+Class: fix
+
+The upload of interlaced PNG files is not supported with older versions (<1.1.7)
+of the python PIL module.
diff --git a/ChangeLog b/ChangeLog
index 01e85be..1003524 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -370,6 +370,7 @@
* 3459 FIX: Bulk edit: Fixed mixup of attributes during consecutive bulk edits
* 3461 FIX: Fixed exception in case manpage for non existant check is accessed
* 3527 FIX: WATO service discovery: fixed warning with locked hosts...
+ * 3534 FIX: Fixed exception with upload of interlaced PNG files...
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 786b836..45af65a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14970,7 +14970,12 @@ def upload_icon(icon_info):
# and finally save the image
dest_dir = "%s/local/share/check_mk/web/htdocs/images/icons" %
defaults.omd_root
make_nagios_directories(dest_dir)
- im.save(dest_dir+'/'+icon_info['icon'][0], 'PNG',
pnginfo=meta)
+ try:
+ im.save(dest_dir+'/'+icon_info['icon'][0], 'PNG',
pnginfo=meta)
+ except IOError, e:
+ # Might happen with interlaced PNG files and PIL version < 1.1.7
+ raise MKUserError(None, _('Unable to upload icon: %s') % e)
+
def load_custom_icons():