[
https://issues.apache.org/jira/browse/LIBCLOUD-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181585#comment-13181585
]
Tomaz Muraus commented on LIBCLOUD-139:
---------------------------------------
Uh, looks like Linode changed their password policy. Will research it.
In the past (pre 3.x support) we did:
root = os.urandom(8).encode('hex')
which is exactly the same thing we currently do, but it also works with Python
3.
root = u(binascii.hexlify(os.urandom(8).encode('hex'))
Your solution works, but it's not really correct - we don't encode the result
which type is bytes which means calling u on it will result in string
b'random'... (e.g. b'foobarfoolo')
It works because this string includes special characters - quotes.
> Typo in Linode driver (hexlify)
> -------------------------------
>
> Key: LIBCLOUD-139
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-139
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Affects Versions: 0.7.1
> Reporter: Miguel Jacq
> Priority: Critical
> Labels: Linode
> Fix For: 0.8.0
>
>
> Traceback (most recent call last):
> File "/usr/local/bin/madelon", line 215, in <module>
> main()
> File "/usr/local/bin/madelon", line 143, in main
> node = conn.create_node(name=host, image=preferred_image[0],
> size=preferred_size[0], auth=pubkey, location=preferred_location[0])
> File
> "/usr/local/lib/python2.6/dist-packages/libcloud/compute/drivers/linode.py",
> line 303, in create_node
> root = u(binascii.hexlifyos.urandom(8).encode('hex'))
> AttributeError: 'module' object has no attribute 'hexlifyos'
> Build step 'Execute shell' marked build as failure
> I think this:
> root = u(binascii.hexlifyos.urandom(8).encode('hex'))
> should be something like this:
> root = u(binascii.hexlify(os.urandom(8)))
> You'll also need to 'import os' too.
> Patch:
> https://raw.github.com/gist/1564685/2993088d4e50b003ebcf6b4bd631a2ca6839f3e6/gistfile1.txt
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira