diff options
author | 2019-10-29 22:20:03 +0100 | |
---|---|---|
committer | 2019-10-29 22:20:53 +0100 | |
commit | adf9ed1917ab33ff0db1b9646a7e174c8e3e9184 (patch) | |
tree | f2c4f70beaeb3a1768c0e3f0bd347ab787257d2b | |
parent | fixes bug #698686 (diff) | |
download | javatoolkit-adf9ed1917ab33ff0db1b9646a7e174c8e3e9184.tar.gz javatoolkit-adf9ed1917ab33ff0db1b9646a7e174c8e3e9184.tar.bz2 javatoolkit-adf9ed1917ab33ff0db1b9646a7e174c8e3e9184.zip |
fix - check if xml file is empty0.6.2
Bug: https://bugs.gentoo.org/667590
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rwxr-xr-x | src/py/build-xml-rewrite | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/py/build-xml-rewrite b/src/py/build-xml-rewrite index b449305..f839615 100755 --- a/src/py/build-xml-rewrite +++ b/src/py/build-xml-rewrite @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import sys +import sys, os import xml.etree.cElementTree as et from optparse import OptionParser @@ -32,6 +32,7 @@ def main(): gcp_sub = et.Element('classpath', path=gcp_str) for file in args: + if os.path.getsize(file) == 0 : continue tree = et.ElementTree(file=file) if gcp or options.encoding: for javac in tree.getiterator('javac'): |