Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)' #5644

Merged
merged 1 commit into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)'
  • Loading branch information
derekbekoe committed Feb 22, 2018
commit 3c1e8be588226710c13a07eda193a7abcd5411a1
2 changes: 1 addition & 1 deletion src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Release History

2.0.28
++++++
* Minor fixes
* Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)' - https://github.com/Azure/azure-cli/issues/5184

2.0.27
++++++
Expand Down
10 changes: 10 additions & 0 deletions src/azure-cli/azure/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# --------------------------------------------------------------------------------------------

import sys
import uuid

from knack.completion import ARGCOMPLETE_ENV_NAME
from knack.log import get_logger
Expand All @@ -12,6 +13,15 @@

import azure.cli.core.telemetry as telemetry


# A workaround for https://bugs.python.org/issue32502 (https://github.com/Azure/azure-cli/issues/5184)
# If uuid1 raises ValueError, use uuid4 instead.
try:
uuid.uuid1()
except ValueError:
uuid.uuid1 = uuid.uuid4


logger = get_logger(__name__)


Expand Down