Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Auto-add __init__.py when model parms created #3501

Merged
merged 2 commits into from
Mar 27, 2017

Conversation

rhyolight
Copy link
Member

Fixes #3500

@rhyolight rhyolight requested a review from oxtopus March 27, 2017 20:08
@@ -55,6 +55,9 @@ def writeModelParamsToFile(modelParams, name):
outDir = os.path.join(os.getcwd(), 'model_params')
if not os.path.isdir(outDir):
os.mkdir(outDir)
# Create an __init__.py so the params are recognized.
initPath = os.path.join(outDir, '__init__.py')
open(initPath, 'a').close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider moving these lines outside of the if not os.path.isdir(outDir): block.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@rhyolight rhyolight merged commit 70b75b7 into numenta:master Mar 27, 2017
@rhyolight rhyolight deleted the hotgym-init branch March 27, 2017 21:39
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.

2 participants