Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoucheng361 committed May 20, 2024
1 parent 22fa83a commit 5473a1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/scripts/hypo/s3_op.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hashlib
import json
import os
import re
import subprocess
try:
__import__('xattr')
Expand Down Expand Up @@ -66,7 +67,9 @@ def handleException(self, e, action, **kwargs):
message = output.get('error', {}).get('message', 'error message not found')
return Exception(f'returncode:{e.returncode} {message}')
except ValueError as ve:
return Exception(f'returncode:{e.returncode} output:{e.output.decode()}')
output = e.output.decode()
output = re.sub(r'\b\d+\.\d+\b|\b\d+\b', '***', output)
return Exception(f'returncode:{e.returncode} output:{output}')
else:
self.logger.info(f'{action} {kwargs} failed: {e}')
return e
Expand Down

0 comments on commit 5473a1d

Please sign in to comment.