Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 179863 Details for
Bug 256491
[PATCH] net-news/rawdog-2.11 breaks with Python 2.6
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch for python 2.6 support
rawdog-python-26.patch (text/plain), 1.59 KB, created by
Ravi Pinjala
on 2009-01-27 07:49:11 UTC
(
hide
)
Description:
Updated patch for python 2.6 support
Filename:
MIME Type:
Creator:
Ravi Pinjala
Created:
2009-01-27 07:49:11 UTC
Size:
1.59 KB
patch
obsolete
>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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256491
:
179862
| 179863