We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e34bd36 commit 17e145cCopy full SHA for 17e145c
virtualenvwrapper.sh
@@ -916,7 +916,12 @@ mktmpenv() {
916
# Generate a unique temporary name, if one is not given.
917
if [ $# -eq 0 ]
918
then
919
- tmpenvname=$("$VIRTUALENVWRAPPER_PYTHON" -c 'import uuid; print uuid.uuid4()')
+ tmpenvname=$("$VIRTUALENVWRAPPER_PYTHON" -c 'import uuid; print uuid.uuid4()' 2>/dev/null)
920
+ if [ -z "$tmpenvname" ]
921
+ then
922
+ # This python does not support uuid
923
+ tmpenvname=$("$VIRTUALENVWRAPPER_PYTHON" -c 'import random; print hex(random.getrandbits(64))[2:-1]' 2>/dev/null)
924
+ fi
925
mkvirtualenv "$tmpenvname"
926
else
927
mkvirtualenv "$@"
0 commit comments