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...
By Venator85 on the 5th of Jul 2009 09:08:14 AM
Download |
Raw |
Embed |
Report
--- /usr/share/rubber/rubber/util.py.old 2009-06-30 21:45:19.000000000 +0200
+++ /usr/share/rubber/rubber/util.py 2009-06-30 21:44:24.000000000 +0200
-5,7 +5,7 @@
by the modules for various tasks.
"""
-import md5
+import hashlib
import os, stat, time
import imp
import re, string
-19,7 +19,7 @@
"""
Compute the MD5 sum of a given file.
"""
- m = md5.new()
+ m = hashlib.md5()
file = open(fname)
for line in file.readlines():
m.update(line)
-102,7 +102,6 @@
#-- Variable handling --{{{1
import UserDict
-from sets import Set
class Variables (UserDict.DictMixin):
"""
-157,9 +156,9 @@
Return the set of keys defined in this environment and its parents.
"""
if self.parent is None:
- return Set(self.dict.keys())
+ return set(self.dict.keys())
else:
- return Set(self.parent.keys()) | Set(self.dict.keys())
+ return set(self.parent.keys()) | set(self.dict.keys())
def new_key (self, key, value):
"""
Submit a correction or amendment below.
Make A New Post