Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move user agent constant out of _shared
  • Loading branch information
chlowell committed Aug 2, 2019
commit 3f2e2cd8bae31b5ea3ad734559544a589ef7d58a
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@
# Licensed under the MIT License.
# ------------------------------------
from collections import namedtuple
import platform
from .._version import VERSION

try:
import urllib.parse as parse
except ImportError:
# pylint:disable=import-error
import urlparse as parse # type: ignore

USER_AGENT = "azsdk-python-keyvault-keys/{} Python/{} ({})".format(
VERSION, platform.python_version(), platform.platform()
)

from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase
from .client_base import KeyVaultClientBase
from .http_challenge import HttpChallenge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from msrest.serialization import Model

from ._generated import KeyVaultClient
from . import AsyncChallengeAuthPolicy, USER_AGENT
from . import AsyncChallengeAuthPolicy
from .._user_agent import USER_AGENT


if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from azure.core.pipeline.transport import HttpTransport

from .challenge_auth_policy import ChallengeAuthPolicy
from . import USER_AGENT
from .._user_agent import USER_AGENT


KEY_VAULT_SCOPE = "https://vault.azure.net/.default"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import platform
from ._version import VERSION

USER_AGENT = "azsdk-python-keyvault-keys/{} Python/{} ({})".format(
VERSION, platform.python_version(), platform.platform()
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import platform
from ._version import VERSION

USER_AGENT = "azsdk-python-keyvault-secrets/{} Python/{} ({})".format(
VERSION, platform.python_version(), platform.platform()
)