Package: rss2email
Version: 1:2.55-5
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I was using my own modified version of rss2email for some time
and I have finally decided to switch to the standard Debian
version. I used to be running only rss2email, which was able to
find config.py itself (being in the same directory as feedfile).
See attached patch. Is it really necessary to force r2e on users?

What do you think?

Matej

- -- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (600, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14.3
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)

Versions of packages rss2email depends on:
ii  python                        2.3.5-3    An interactive high-level object-o

rss2email recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDqGQp4J/vJdlkhKwRAkuqAJ4xxOrxhG4x0USLKVEokKo1GUypyQCdEmmO
qh17/Vm8UpDvnrCMZNSUwuQ=
=Mkc8
-----END PGP SIGNATURE-----
--- /usr/share/rss2email/rss2email.py   2005-11-27 15:58:19.000000000 -0500
+++ /home/matej/.programky/rss2email.py 2005-08-11 18:45:54.000000000 -0400
@@ -90,16 +90,6 @@
 # Wrap long lines at position. 0 for no wrapping. (Requires Python 2.3.)
 BODY_WIDTH = 0
 
-### Load the Options ###
-
-# Read options from config file if present.
-import sys
-sys.path.append(".")
-try:
-       from config import *
-except:
-       pass
-       
 ### Import Modules ###
 
 import cPickle as pickle, fcntl, md5, time, os, traceback, urllib2, sys, types
@@ -137,11 +127,7 @@
 
 def header7bit(s):
        """QP_CORRUPT headers."""
-       #return mimify.mime_encode_header(s + ' ')[:-1]
-       # XXX due to mime_encode_header bug
-       import re
-       p = re.compile('=\n([^ \t])');
-       return p.sub(r'\1', mimify.mime_encode_header(s + ' ')[:-1])
+    return mimify.mime_encode_header(s + ' ')[:-1]
 
 ### Parsing Utilities ###
 
@@ -289,7 +275,6 @@
        try:
                # We store the default to address as the first item in the 
feeds list.
                # Here we take it out and save it for later.
-               default_to = ""
                if feeds and isstr(feeds[0]): default_to = feeds[0]; ifeeds = 
feeds[1:] 
                else: ifeeds = feeds
                
@@ -455,7 +440,6 @@
 
 def list():
        feeds, feedfileObject = load(lock=0)
-       default_to = ""
        
        if feeds and isstr(feeds[0]):
                default_to = feeds[0]; ifeeds = feeds[1:]; i=1
@@ -490,6 +474,22 @@
        try:
                if len(args) < 3: raise ie, "insufficient args"
                feedfile, action, args = args[1], args[2], args[3:]
+        ### Load the Options ###
+
+        # Read options from config file if present.
+        sys.path.append(os.path.dirname(feedfile))
+        try:
+            from config import *
+            if QP_REQUIRED:
+                import mimify
+                from StringIO import StringIO as SIO
+            if SMTP_SEND:
+                import smtplib
+                smtpserver = smtplib.SMTP(SMTP_SERVER)
+            else:
+                smtpserver = None
+        except:
+            pass
                
                if action == "run": 
                        if args and args[0] == "--no-send":

Reply via email to