Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

generate AMENT_IGNORE file in build space #118

Merged
merged 1 commit into from
Nov 7, 2016
Merged

Conversation

dirk-thomas
Copy link
Contributor

Fixes #117.

@dirk-thomas dirk-thomas added the in review Waiting for review (Kanban column) label Nov 5, 2016
@dirk-thomas dirk-thomas self-assigned this Nov 5, 2016
@dirk-thomas dirk-thomas merged commit 483a512 into master Nov 7, 2016
@dirk-thomas dirk-thomas deleted the ignore_build_space branch November 7, 2016 18:33
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Nov 7, 2016
ignore_file = os.path.join(context.build_space, 'AMENT_IGNORE')
if not os.path.exists(ignore_file) and not context.dry_run:
os.makedirs(context.build_space, exist_ok=True)
with open(ignore_file, 'w'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the write flag be w+ to be sure to create the file if it doesn't exist ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want w ("open for writing, truncating the file first") and not + ("open a disk file for updating (reading and writing)") (see https://docs.python.org/3/library/functions.html#open).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right sorry for the noise. The problem I faced was not related

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants