This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new c856cf8  Allow for non-UTF-8 chars in JIRA response
c856cf8 is described below

commit c856cf86dd93973733c55e836750738c8d3ccc08
Author: Sebb <[email protected]>
AuthorDate: Tue Jan 29 16:21:50 2019 +0000

    Allow for non-UTF-8 chars in JIRA response
---
 lib/whimsy/asf/podling.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 704bada..4e1f035 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -363,7 +363,8 @@ module ASF
         begin
           res = Net::HTTP.get_response(URI(query))
           res.value() # Raises error if not OK
-          File.write cache, res.body
+          file = File.new(cache,"wb") # Allow for non-UTF-8 chars
+          file.write res.body
         rescue => e
           Wunderbar.warn "ASF::Podling.namesearch: " + e.message
           FileUtils.touch cache # Don't try again for a while

Reply via email to