Skip to content

Commit 5782691

Browse files
authored
minor fix (#1704)
1 parent bcda3d8 commit 5782691

72 files changed

Lines changed: 5 additions & 5 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/bcf/src/bcf/v3/bcfapi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
import webbrowser
77
import http.server
88
import base64
9-
10-
from werkzeug.datastructures import HeaderSet
11-
9+
import tempfile
10+
import os
1211

1312
client_id, client_secret = "", ""
1413

@@ -135,6 +134,7 @@ def __init__(self, foundation_client):
135134
self.foundation_client = foundation_client
136135
self.version_id = None
137136
self.baseurl = None
137+
self.filepath = tempfile.mkdtemp()
138138

139139
def set_version(self, version):
140140
self.version_id = version["version_id"]
@@ -282,7 +282,7 @@ def get_snippet(self, project_id="", topic_id="") -> str:
282282
headers=headers,
283283
)
284284
# TODO: write to tmpdir
285-
with open(f"{project_id}_{topic_id}_snippet.txt", "w") as f:
285+
with open(os.path.join(self.filepath, f"{project_id}_{topic_id}_snippet.txt"), "wb") as f:
286286
f.write(response.content.decode("utf-8"))
287287
return response.status_code, response.content
288288

@@ -544,7 +544,7 @@ def get_document(self, project_id="", topic_id="", document_id="") -> str:
544544
f"{self.baseurl}/projects/{project_id}/topics/documents/{document_id}",
545545
headers=headers,
546546
)
547-
with open(f"{project_id}_{topic_id}_{document_id}_document.txt", "w") as f:
547+
with open(os.path.join(self.filepath, f"{project_id}_{topic_id}_{document_id}_document.txt"), "wb") as f:
548548
f.write(response.content.decode("utf-8"))
549549
return response.status_code, response.content
550550

File renamed without changes.
File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Action/comment_actions.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Action/comment_actions.json

File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Action/project_actions.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Action/project_actions.json

File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Action/topic_actions.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Action/topic_actions.json

File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Action/viewpoint_actions.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Action/viewpoint_actions.json

File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Comment/comment_GET.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Comment/comment_GET.json

File renamed without changes.

src/foundationserver/bcfserver/bcf/schemas/Collaboration/Comment/comment_POST.json renamed to src/opencdeserver/opencdeserver/bcf/schemas/Collaboration/Comment/comment_POST.json

File renamed without changes.

0 commit comments

Comments
 (0)