Recent Posts
C++ | 18 sec ago
None | 46 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
None | 2 min ago
mIRC | 3 min ago
C++ | 3 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Venator85 on the 5th of Jul 2009 09:08:14 AM Download | Raw | Embed | Report
  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.                 """
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: