Skip to content

Commit 30727d9

Browse files
authored
Merge pull request #5674 from DIRACGridBot/cherry-pick-2-e560ca355-integration
[sweep:integration] Fix decoding of content in WLCGAccountingHTTPJson
2 parents 1c11268 + cd8f248 commit 30727d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from __future__ import division
1212
from __future__ import print_function
1313

14+
import os
1415
import requests
1516

1617
from DIRAC.Core.Security.Locations import getCAsLocation
@@ -48,6 +49,7 @@ def _downloadJsonFile(self, occupancyLFN, filePath):
4849
caPath = getCAsLocation()
4950
res = requests.get(occupancyLFN, verify=caPath)
5051
res.raise_for_status()
51-
fd.write(res.content)
52+
fd.write(res.text)
5253
except Exception as e:
5354
self.log.debug("Exception while copying", repr(e))
55+
os.remove(filePath)

0 commit comments

Comments
 (0)