From 3254468dc06961139b4c0f70fccbd2afd1845dc7 Mon Sep 17 00:00:00 2001
From: "Pieter J. Kersten"
Date: Tue, 8 Mar 2011 14:04:15 +0100
Subject: [PATCH] [FIX] account_banking_nl_girotol: use correct values to
convert to/from SWIFT, only convert string
types
---
account_banking/__terp__.py | 2 +-
account_banking_fi_patu/__terp__.py | 2 +-
account_banking_nl_clieop/__terp__.py | 2 +-
account_banking_nl_girotel/__terp__.py | 2 +-
account_banking_nl_girotel/girotel.py | 16 +++++++++++++---
account_banking_nl_multibank/__terp__.py | 2 +-
6 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/account_banking/__terp__.py b/account_banking/__terp__.py
index 74747ced2..60fb1e4f9 100644
--- a/account_banking/__terp__.py
+++ b/account_banking/__terp__.py
@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking',
- 'version': '0.1.50',
+ 'version': '0.1.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',
diff --git a/account_banking_fi_patu/__terp__.py b/account_banking_fi_patu/__terp__.py
index 6500adb07..b123b7ae5 100644
--- a/account_banking_fi_patu/__terp__.py
+++ b/account_banking_fi_patu/__terp__.py
@@ -26,7 +26,7 @@
##############################################################################
{
'name': 'Account Banking PATU module',
- 'version': '0.50',
+ 'version': '0.51',
'license': 'GPL-3',
'author': 'Sami Haahtinen',
'website': 'http://ressukka.net',
diff --git a/account_banking_nl_clieop/__terp__.py b/account_banking_nl_clieop/__terp__.py
index 394578776..d70e347f6 100644
--- a/account_banking_nl_clieop/__terp__.py
+++ b/account_banking_nl_clieop/__terp__.py
@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking NL ClieOp',
- 'version': '0.50',
+ 'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',
diff --git a/account_banking_nl_girotel/__terp__.py b/account_banking_nl_girotel/__terp__.py
index 0d4ccf8af..1a6613f9e 100644
--- a/account_banking_nl_girotel/__terp__.py
+++ b/account_banking_nl_girotel/__terp__.py
@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking - Girotel',
- 'version': '0.50',
+ 'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',
diff --git a/account_banking_nl_girotel/girotel.py b/account_banking_nl_girotel/girotel.py
index b2b374732..f4854833f 100644
--- a/account_banking_nl_girotel/girotel.py
+++ b/account_banking_nl_girotel/girotel.py
@@ -60,17 +60,27 @@ class transaction_message(object):
'remote_account', 'remote_owner', 'u2', 'transferred_amount',
'direction', 'u3', 'message', 'remote_currency',
]
+ # Attributes with possible non-ASCII string content
+ strattrs = [
+ 'remote_owner', 'message'
+ ]
ids = {}
def __setattribute__(self, attr, value):
- if attr != 'attrnames' and attr in self.attrnames:
+ '''
+ Convert values for string content to SWIFT-allowable content
+ '''
+ if attr != 'attrnames' and attr in self.strattrs:
value = to_swift(value)
- super(transaction_message, self).__setattribute__(attr, val)
+ super(transaction_message, self).__setattribute__(attr, value)
def __getattribute__(self, attr):
+ '''
+ Convert values from string content to SWIFT-allowable content
+ '''
retval = super(transaction_message, self).__getattribute__(attr)
- return attr != 'attrnames' and attr in self.attrnames and to_swift(retval) or retval
+ return attr != 'attrnames' and attr in self.strattrs and to_swift(retval) or retval
def genid(self):
'''
diff --git a/account_banking_nl_multibank/__terp__.py b/account_banking_nl_multibank/__terp__.py
index d65eb0e26..22ca377ee 100644
--- a/account_banking_nl_multibank/__terp__.py
+++ b/account_banking_nl_multibank/__terp__.py
@@ -25,7 +25,7 @@
##############################################################################
{
'name': 'Account Banking',
- 'version': '0.50',
+ 'version': '0.51',
'license': 'GPL-3',
'author': 'EduSense BV',
'website': 'http://www.edusense.nl',