Skip to content

Commit

Permalink
revert zipper changes to test sensitive data issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nkan-aot2 authored Jan 29, 2025
1 parent 93a777d commit 4f29dc2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions computingservices/ZippingServices/services/zipperservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,15 @@ def __zipfilesandupload(_message, s3credentials):
_formattedbytes = None
_filename, extension = path.splitext(fileobj["s3uripath"])

if extension == '.pdf':
try:
_formattedbytes = __removesensitivecontent(_docbytes)
if _formattedbytes is not None:
print("_formattedbytes length is {0}".format(len(_formattedbytes)))
else:
print("_formattedbytes is none")
except Exception:
print("error happened while removing sensitive content of {0} ".format(filename))
print(traceback.format_exc())
try:
_formattedbytes = __removesensitivecontent(_docbytes)
if _formattedbytes is not None:
print("_formattedbytes length is {0}".format(len(_formattedbytes)))
else:
print("_formattedbytes is none")
except Exception:
print("error happened while removing sensitive content of {0} ".format(filename))
print(traceback.format_exc())
#added a space to try out code merge on git. 18-Sept-2024
zip.writestr(
filename, _docbytes if _formattedbytes is None else _formattedbytes
Expand Down

0 comments on commit 4f29dc2

Please sign in to comment.