Permalink
Browse files

Properly handle filenames

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
  • Loading branch information...
1 parent eb08d03 commit c2c26ac1733f0ca5f0e769b9a7e7e9318da05886 Eugeni Dodonov committed Jan 24, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 findbugs.py
View
@@ -59,8 +59,9 @@ def parse_bugs(file):
for attach in bug.findall("./attachment"):
for filename in attach.findall("./filename"):
if filename.text.find("error_state") >= 0:
- print "Found possible error_state for %s: %s" % (bug_id, filename.text)
- fd = open("error_state.%s.%s" % (bug_id, filename.text), "w")
+ output = filename.text.strip()
+ print "Found possible error_state for %s: %s" % (bug_id, output)
+ fd = open("error_state.%s.%s" % (bug_id, output), "w")
for data in attach.findall("./data"):
fd.write(base64.b64decode(data.text))
fd.close()

0 comments on commit c2c26ac

Please sign in to comment.