~abompard/mailman/sqlalchemy

« back to all changes in this revision

Viewing changes to src/mailman/utilities/importer.py

  • Committer: Abhilash Raj
  • Date: 2014-09-25 13:06:24 UTC
  • Revision ID: raj.abhilash1@gmail.com-20140925130624-uahqe0svszbycrtm
Add support for postgresql

* revert changes in message_id_has encoding by barry
* Change message_id_hash column to LargeBinary
  (from previously mistaken one i.e.unicode)
* add missing import in database/types.py
* fix a bug in database/Model.py, transaction has no
  method abort(), instead it is rollback()

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        }[value]
129
129
 
130
130
 
 
131
def int_to_bool(value):
 
132
    if value:
 
133
        return True
 
134
    else:
 
135
        return False
 
136
 
131
137
 
132
138
def check_language_code(code):
133
139
    if code is None:
172
178
    personalize=Personalization,
173
179
    preferred_language=check_language_code,
174
180
    reply_goes_to_list=ReplyToMunging,
 
181
    allow_list_posts=int_to_bool,
 
182
    include_rfc2369_headers=int_to_bool,
 
183
    nntp_prefix_subject_too=int_to_bool,
175
184
    )
176
185
 
177
186