Share Pastebin
Guest
Public paste!

Venator85

By: a guest | Jul 5th, 2009 | Syntax: None | Size: 0.98 KB | Hits: 2 | Expires: Never
Copy text to clipboard
  1. --- /usr/share/rubber/rubber/util.py.old        2009-06-30 21:45:19.000000000 +0200
  2. +++ /usr/share/rubber/rubber/util.py    2009-06-30 21:44:24.000000000 +0200
  3.  -5,7 +5,7 @@
  4.  by the modules for various tasks.
  5.  """
  6.  
  7. -import md5
  8. +import hashlib
  9.  import os, stat, time
  10.  import imp
  11.  import re, string
  12.  -19,7 +19,7 @@
  13.         """
  14.         Compute the MD5 sum of a given file.
  15.         """
  16. -       m = md5.new()
  17. +       m = hashlib.md5()
  18.         file = open(fname)
  19.         for line in file.readlines():
  20.                 m.update(line)
  21.  -102,7 +102,6 @@
  22.  #-- Variable handling --{{{1
  23.  
  24.  import UserDict
  25. -from sets import Set
  26.  
  27.  class Variables (UserDict.DictMixin):
  28.         """
  29.  -157,9 +156,9 @@
  30.                 Return the set of keys defined in this environment and its parents.
  31.                 """
  32.                 if self.parent is None:
  33. -                       return Set(self.dict.keys())
  34. +                       return set(self.dict.keys())
  35.                 else:
  36. -                       return Set(self.parent.keys()) | Set(self.dict.keys())
  37. +                       return set(self.parent.keys()) | set(self.dict.keys())
  38.  
  39.         def new_key (self, key, value):
  40.                 """