Ticket #5478 (closed: fixed)
Bug in python config[] with relative paths not transformed correctly (new API)
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 2.2 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Andrei Savici |
Description
Using mantid.config[] with a relative path should always return the absolute path that has been constructed from the location of the properties file, this is not happening.
To reproduce ()
- open up the Mantid.properties file;
- change the instrumentDefintion.directory key to be a relative path to the instrument directory rather than the hard-coded absolute one;
- open a terminal and set the PYTHONPATH variable to point to your bin directory (or bin/debug for windows)
- change to any other directory than the one containing the 'Mantid.properties' file and start python
- type:
from mantid import config print config['instrumentDefinition.directory']
the path should be absolute but it is not at present.
Change History
comment:3 Changed 8 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:4 Changed 8 years ago by Martyn Gigg
Fix relative->absolute bug in [] op on ConfigService. Refs #5478
Changeset: b9fb908133b24112074aca8b8e69a449e85422ba
comment:5 Changed 8 years ago by Martyn Gigg
Fix relative->absolute bug in [] op on ConfigService. Refs #5478
Changeset: b9fb908133b24112074aca8b8e69a449e85422ba
Note: See
TracTickets for help on using
tickets.
Fix relative->absolute bug in [] op on ConfigService. Refs #5478