Skip to content

Commit

Permalink
fix + RN (#32990)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilappe committed Feb 20, 2024
1 parent 2abddeb commit 2510e4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Packs/ServiceNow/Integrations/ServiceNowv2/ServiceNowv2.py
@@ -1,7 +1,6 @@
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import re
import shutil
from collections.abc import Callable, Iterable


Expand Down Expand Up @@ -709,8 +708,8 @@ def send_request(self, path: str, method: str = 'GET', body: dict | None = None,
try:
file_entry = file['id']
file_name = file['name']
shutil.copy(demisto.getFilePath(file_entry)['path'], file_name)
with open(file_name, 'rb') as f:
file_path = demisto.getFilePath(file_entry)['path']
with open(file_path, 'rb') as f:
file_info = (file_name, f, self.get_content_type(file_name))
if self.use_oauth:
access_token = self.snow_client.get_access_token()
Expand All @@ -723,7 +722,6 @@ def send_request(self, path: str, method: str = 'GET', body: dict | None = None,
res = requests.request(method, url, headers=headers, data=body, params=params,
files={'file': file_info}, auth=self._auth,
verify=self._verify, proxies=self._proxies)
shutil.rmtree(demisto.getFilePath(file_entry)['name'], ignore_errors=True)
except Exception as err:
raise Exception('Failed to upload file - ' + str(err))
else:
Expand Down
Expand Up @@ -1610,7 +1610,7 @@ script:
- contextPath: ServiceNow.Generic.Response
description: Generic response to servicenow api.
type: string
dockerimage: demisto/python3:3.10.13.86272
dockerimage: demisto/python3:3.10.13.87159
isfetch: true
ismappable: true
isremotesyncin: true
Expand Down
7 changes: 7 additions & 0 deletions Packs/ServiceNow/ReleaseNotes/2_5_54.md
@@ -0,0 +1,7 @@

#### Integrations

##### ServiceNow v2

- Fixed an issue where the ***servicenow-upload-file*** command failed in case the file name contained invalid characters.
- Updated the Docker image to: *demisto/python3:3.10.13.87159*.
2 changes: 1 addition & 1 deletion Packs/ServiceNow/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "ServiceNow",
"description": "Use The ServiceNow IT Service Management (ITSM) solution to modernize the way you manage and deliver services to your users.",
"support": "xsoar",
"currentVersion": "2.5.53",
"currentVersion": "2.5.54",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 2510e4c

Please sign in to comment.