Skip to content

Commit

Permalink
Bug fix for 'ValueError: field 6 out of range (need a 48-bit value)' (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
derekbekoe authored Feb 22, 2018
1 parent f5609f8 commit d3aebfd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

0 comments on commit d3aebfd

Please sign in to comment.