foxygit / doom Log in
commit 74560947e2ff285718ed0ed71ae00bf1e77441e9
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Fri Sep 22 22:12:50 2006 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Fri Sep 22 22:12:50 2006 +0000

    Continue to build things if we fail to update chocolate_doom_icon.c
    - display a warning about missing Python Image library.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 654
---
 src/convert-icon | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/convert-icon b/src/convert-icon
index c42093d6..3fb373e9 100755
--- a/src/convert-icon
+++ b/src/convert-icon
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# $Id: convert-icon 297 2006-01-16 23:35:55Z fraggle $
+# $Id: convert-icon 654 2006-09-22 22:12:50Z fraggle $
 #
 # Copyright(C) 2005 Simon Howard
 #
@@ -33,11 +33,17 @@
 # Add application icon to running program
 #

-import Image
 import sys
 import os
 import re

+try:
+        import Image
+except ImportError:
+        print "WARNING: Could not update %s.  Please install the Python Image library." % sys.argv[2]
+        sys.exit(0)
+
+
 def convert_image(filename, output_filename):

     im = Image.open(filename).convert("RGB")