Skip to content

Commit e232c84

Browse files
committed
python3 compat fixes
1 parent 6c525a6 commit e232c84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

st2auth_keystone_backend/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from keystone import KeystoneAuthenticationBackend
16+
from .keystone import KeystoneAuthenticationBackend
1717

1818
__all__ = [
1919
'KeystoneAuthenticationBackend'

st2auth_keystone_backend/keystone.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515

1616
import logging
17-
import httplib
17+
import http.client
1818

1919
import requests
2020

@@ -65,7 +65,7 @@ def authenticate(self, username, password):
6565
LOG.debug('Authentication for user "{}" failed: {}'.format(username, str(e)))
6666
return False
6767

68-
if login.status_code in [httplib.OK, httplib.CREATED]:
68+
if login.status_code in [http.client.OK, http.client.CREATED]:
6969
LOG.debug('Authentication for user "{}" successful'.format(username))
7070
return True
7171
else:

0 commit comments

Comments
 (0)