Skip to content

Commit d0ec33f

Browse files
committed
Use http client instead of HTTPStatus, which was added in 3.5.
Change-Id: I415c7f69dbf320c76a7eb3e5410b6cf6e9fea112
1 parent dc6eb08 commit d0ec33f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/UnityAssetUploader/unity_asset_uploader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"""
2121

2222
import argparse
23-
from http import client, HTTPStatus
23+
from http import client
2424
from urllib import parse
2525
import json
2626
import os
@@ -162,7 +162,7 @@ def _make_request(
162162
else:
163163
raise ValueError("Invalid http method provided.")
164164
response = connection.getresponse()
165-
if response.status > HTTPStatus.FOUND:
165+
if response.status > client.FOUND:
166166
print("Response: {}".format(response.read()))
167167
raise Exception("Error making http request: {} {}".format(
168168
response.status, response.reason))
@@ -203,7 +203,7 @@ def _login(self):
203203
encoded_path,
204204
headers={'Accept': 'application/json'})
205205
response = connection.getresponse()
206-
if response.status > HTTPStatus.FOUND:
206+
if response.status > client.FOUND:
207207
print("Response: {}".format(response.read()))
208208
raise RequestError("Error making https request: {} {}".format(
209209
response.status, response.reason))

0 commit comments

Comments
 (0)