Skip to content

Commit

Permalink
Use enum value instead of literal str. (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
digimaun authored May 25, 2021
1 parent b268dbe commit a4baacb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azext_iot/_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from azext_iot.common.sas_token_auth import SasTokenAuthentication
from azext_iot.iothub.providers.aad_oauth import IoTHubOAuth
from azext_iot.common.shared import SdkType
from azext_iot.common.shared import SdkType, AuthenticationTypeDataplane
from azext_iot.constants import USER_AGENT, IOTHUB_RESOURCE_ID
from msrestazure.azure_exceptions import CloudError

Expand Down Expand Up @@ -102,7 +102,7 @@ def _get_iothub_service_sdk(self):

if self.auth_override:
credentials = self.auth_override
elif self.target["policy"] == "login":
elif self.target["policy"] == AuthenticationTypeDataplane.login.value:
credentials = IoTHubOAuth(
cmd=self.target["cmd"],
resource_id=IOTHUB_RESOURCE_ID
Expand Down

0 comments on commit a4baacb

Please sign in to comment.