diff -Naur rawdog-2.11_orig/rawdoglib/rawdog.py rawdog-2.11/rawdoglib/rawdog.py --- rawdoglib/rawdog.py 2008-02-23 16:11:07.000000000 -0600 +++ rawdoglib/rawdog.py 2009-01-27 01:42:32.000000000 -0600 @@ -20,7 +20,7 @@ STATE_VERSION = 2 import feedparser, feedfinder, plugins from persister import Persistable, Persister -import os, time, sha, getopt, sys, re, cgi, socket, urllib2, calendar +import os, time, hashlib, getopt, sys, re, cgi, socket, urllib2, calendar import string, locale from StringIO import StringIO import types @@ -262,7 +262,7 @@ def short_hash(s): """Return a human-manipulatable 'short hash' of a string.""" - return sha.new(s).hexdigest()[-8:] + return hashlib.sha1(s).hexdigest()[-8:] def decode_structure(struct, encoding): """Walk through a structure returned by feedparser, decoding any @@ -488,7 +488,7 @@ self.added = now def compute_hash(self): - h = sha.new() + h = hashlib.sha1() def add_hash(s): h.update(s.encode("UTF-8")) @@ -587,15 +587,15 @@ """Parse a list of feed arguments. Raise ConfigError if the syntax is invalid.""" args = {} for a in argparams: - as = a.split("=", 1) - if len(as) != 2: + az = a.split("=", 1) + if len(az) != 2: raise ConfigError("Bad feed argument in config: " + a) - args[as[0]] = as[1] + args[az[0]] = az[1] for a in arglines: - as = a.split(None, 1) - if len(as) != 2: + az = a.split(None, 1) + if len(az) != 2: raise ConfigError("Bad argument line in config: " + a) - args[as[0]] = as[1] + args[az[0]] = az[1] if "maxage" in args: args["maxage"] = parse_time(args["maxage"]) return args