Closed
Bug 651197
Opened 15 years ago
Closed 15 years ago
Manifest Destiny - Support relative paths in the 'path' attribute when not set in the section
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ahal, Unassigned)
Details
Attachments
(1 file)
|
2.12 KB,
patch
|
Details | Diff | Splinter Review |
I didn't know how to make the title not sound confusing, but basically if you have a manifest that lives in '/here/' that looks like:
[foo]
path = 'bar/baz'
the resulting path will be '/here/foo'. This is because we do a path.join on section instead of path: http://hg.mozilla.org/automation/ManifestDestiny/file/ab34ed26aea9/manifestparser.py#l227
Easy fix:
- test['path'] = os.path.join(here, section)
+ test['path'] = os.path.join(here, test['path'])
| Reporter | ||
Comment 1•15 years ago
|
||
str:
1) make the following manifest:
[foo]
path = some/relative/path
2) run the following code
from manifestparser import *
parser = ManifestParser()
parser.read('manifest.ini')
foo = parser.get()
for bar in foo:
print bar['path']
results:
expected path - '/here/some/relative/path'
actual path - '/here/foo'
The one liner in the above comment should fix this.
Comment 2•15 years ago
|
||
fix + testcase. I can't push, for some reason, but if anyone wants to check this in, please do
Comment 3•15 years ago
|
||
Pushed to pypi as http://pypi.python.org/pypi/ManifestDestiny/0.3.1
Comment 4•15 years ago
|
||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•