Add TemporaryDirectory to mozfile

RESOLVED FIXED

Status

Testing
Mozbase
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ted, Assigned: ted)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 754916 [details] [diff] [review]
add mozfile.TemporaryDirectory

I have this TemporaryDirectory context manager helper I've written previously:
http://mxr.mozilla.org/mozilla-central/source/testing/runcppunittests.py#15

I think it'd be useful to have in mozfile.
Attachment #754916 - Flags: review?(jhammel)

Comment 1

5 years ago
Comment on attachment 754916 [details] [diff] [review]
add mozfile.TemporaryDirectory

Looks great! thanks!
Attachment #754916 - Flags: review?(jhammel) → review+
(Assignee)

Comment 2

5 years ago
Pushed:
https://github.com/mozilla/mozbase/commit/4e7277b0df0a8b5a453586c25f234011b4f3ef83

Apparently this made Python 3.2, so we could probably attempt to import it from tempfile if we wanted to be forward-compat:
http://docs.python.org/dev/library/tempfile.html#tempfile.TemporaryDirectory
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.