Skip to content

Commit 5d2ae89

Browse files
committed
Change os.path functions to pathlib.Path functions in gh_api.py
Signed-off-by: Hussaina Begum Nandyala <[email protected]>
1 parent 219dea4 commit 5d2ae89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/gh_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import requests
1313
import getpass
1414
import json
15+
from pathlib import Path
1516

1617
try:
1718
import requests_cache
@@ -274,7 +275,7 @@ def encode_multipart_formdata(fields, boundary=None):
274275
def post_download(project, filename, name=None, description=""):
275276
"""Upload a file to the GitHub downloads area"""
276277
if name is None:
277-
name = os.path.basename(filename)
278+
name = Path(filename).name
278279
with open(filename, 'rb') as f:
279280
filedata = f.read()
280281

0 commit comments

Comments
 (0)