summaryrefslogtreecommitdiff
path: root/debian/patches/java_ignore_nonexistent_files.patch
blob: 5ba47130da68fe1c64edb4a6386c65d3da609a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description:	Ignore nonexistent files before trying to use them in Java()
Origin:		Debian
Bug-Debian:	http://bugs.debian.org/338232
Forwarded:	http://scons.tigris.org/issues/show_bug.cgi?id=2207

Index: scons/engine/SCons/Tool/JavaCommon.py
===================================================================
--- scons.orig/engine/SCons/Tool/JavaCommon.py	2013-03-23 03:19:25.394200546 +0100
+++ scons/engine/SCons/Tool/JavaCommon.py	2013-03-23 03:28:01.158216345 +0100
@@ -282,7 +282,10 @@
             return self.outer_state
 
     def parse_java_file(fn, version=default_java_version):
-        return parse_java(open(fn, 'r').read(), version)
+        try:
+            return parse_java(open(fn, 'r').read(), version)
+        except IOError:
+            return (None, [])
 
     def parse_java(contents, version=default_java_version, trace=None):
         """Parse a .java file and return a double of package directory,