Parse errors with Python 2.4.3

Bug #532929 reported by Volker Börchers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-email-notifier
Confirmed
Medium
Unassigned

Bug Description

In REAME the following statement is made:

     Python, version 2.4 or later is required

But I had to patch bzr_email_notifier.py and configuration.py to get them to run under 2.4.3.

1. bzr_email_notifier.py:

  File "./bzr_email_notifier.py", line 49
    directories = [path if path[-1] != '/' else path[:-1] for path in arguments]

Fix:

--- bzr_email_notifier.py.orig 2010-03-05 17:31:33.000000000 +0000
+++ bzr_email_notifier.py 2010-03-05 17:44:53.000000000 +0000
@@ -46,7 +46,7 @@
         sys.exit(1)

     # Strip trailing '/' from any paths provided.
- directories = [path if path[-1] != '/' else path[:-1] for path in arguments]
+ directories = [path[-1] != '/' and path or path[:-1] for path in arguments]

     global config
     config = Configuration(options.config_file)

2. configuration.py:

Traceback (most recent call last):
  File "./bzr_email_notifier.py", line 30, in ?
    from configuration import Configuration, SendEmailError
  File "/home/persistent/f/fr/freeplane/bzr-email-notifier-1.5/configuration.py", line 194
    message = EmailMessage(from_address, to_address, subject, None if self._is_html else body)

Fix:

--- configuration.py.orig 2010-03-05 17:34:41.000000000 +0000
+++ configuration.py 2010-03-05 21:24:44.000022000 +0000
@@ -191,7 +191,7 @@
         else:
             body = unicode(self._body_template(actual_data))

- message = EmailMessage(from_address, to_address, subject, None if self._is_html else body)
+ message = EmailMessage(from_address, to_address, subject, self._is_html and None or body)

         if not body is None and self._is_html:
             # Using HTML for message. Add it as an inline attachment.

I hope I didn't miss something very obvious.

Thanks for the Software,
Volker

Jelmer Vernooij (jelmer)
Changed in bzr-email-notifier:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.