~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/console.py

  • Committer: Matt Giuca
  • Date: 2009-04-28 08:44:06 UTC
  • Revision ID: matt.giuca@gmail.com-20090428084406-v1dp0ouubpyomemb
ivle.console: Replaced md5 module with hashlib. (md5 is deprecated and
    generates warnings in Python 2.6).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
import errno
25
25
import cPickle
26
 
import md5
 
26
import hashlib
27
27
import os
28
28
import random
29
29
import socket
154
154
 
155
155
        # Create magic
156
156
        # TODO
157
 
        self.magic = md5.new(uuid.uuid4().bytes).digest().encode('hex')
 
157
        self.magic = hashlib.md5(uuid.uuid4().bytes).hexdigest()
158
158
 
159
159
        # Try to find a free port on the server.
160
160
        # Just try some random ports in the range [3000,8000)