Originally on 2010-08-26
In [[source:modules/websubmit/lib/bibdocfile.py#L66|bibdocfile]], [[source:modules/elmsubmit/lib/elmsubmit_filename_generator.py#L33|elmsubmit_filename_generator]] and [[source:configure-tests.py#L240|configure-tests]], we test the import of the module magic. These tests are not sufficient as other Python modules are named magic but do not offer all the variables or functions needed in the code.
So we also need to test that all variables and functions used are present in the imported module, e.g.:
if not hasattr(magic, 'open'):
CFG_HAS_MAGIC = True
CFG_HAS_MAGIC = False
Commit 9208ef210a77c93c1b432321940aecae59454194 fixes the issue.
Ideally Invenio should also support the package being the 1st hit on Google when searching for "python-magic": [http://pypi.python.org/pypi/python-magic/0.1]
Originally by Benoit Thiell firstname.lastname@example.org on 2010-08-26
#CommitTicketReference repository="" revision="b68827cf1aa6a1dbfb1613ad14ea87f6de012a00"
kwalitee: better check of python-magic import
- Check that the python-magic package is the one supported by Invenio.
WRT commit log messages, please don't forget to add things like
closes #260 or addresses #260 so that the auto-closure works, see
(Otherwise I'm adding them, but it is nicer/quicker if you do.)
WRT personal branch names, they may occasionally appear in the repo
history, if things are merged and not cherry-picked. So, generally
speaking, please use something more descriptive than the sole Trac
ticket number. This will make the repo to be nicely usable in the
offline mode: one does not always have online access to Trac, and the
ticket number appears in the commit log message anyway.
Originally by Benoit Thiell email@example.com on 2010-08-27
#CommitTicketReference repository="" revision="6b1b68977673b9a65f4eacfd21cd2adb7ad9680c"
kwalitee: close mkstemp temporary files
- Properly close temporary files open by tempfile.mkstemp. (closes #260)
Originally on 2010-08-27
Replying to [comment:5 Benoit Thiell ]:
Properly close temporary files open by tempfile.mkstemp. (closes #260)
Wrong ticket number, should have been #262. (spotted after merge)