Author: tomaz
Date: Fri Jan  6 21:17:42 2012
New Revision: 1228414

URL: http://svn.apache.org/viewvc?rev=1228414&view=rev
Log:
Make sure that the password we generate in the Linode compute driver 
has at least one uppercase / special character. Should fix 
LIBCLOUD-139.
M    linode.py

Modified:
    libcloud/trunk/libcloud/compute/drivers/linode.py

Modified: libcloud/trunk/libcloud/compute/drivers/linode.py
URL: 
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/linode.py?rev=1228414&r1=1228413&r2=1228414&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/linode.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/linode.py Fri Jan  6 21:17:42 2012
@@ -28,6 +28,7 @@ Linode(R) is a registered trademark of L
 """
 
 import os
+import hashlib
 
 try:
     import simplejson as json
@@ -302,7 +303,7 @@ class LinodeNodeDriver(NodeDriver):
 
         # Step 2: linode.disk.createfromdistribution
         if not root:
-            root = binascii.hexlify(os.urandom(8)).decode('ascii')
+            root = binascii.b2a_base64(os.urandom(8)).decode('ascii')
 
         params = {
             "api_action":       "linode.disk.createfromdistribution",


Reply via email to