def _notebook_dir_changed(self, name, old, new):
if os.path.exists(new) and not os.path.isdir(new):<EOL><INDENT>raise TraitError("<STR_LIT>" % new)<EOL><DEDENT>if not os.path.exists(new):<EOL><INDENT>self.log.info("<STR_LIT>", new)<EOL>try:<EOL><INDENT>os.mkdir(new)<EOL><DEDENT>except:<EOL><INDENT>raise TraitError("<STR_LIT>" % new)<EOL><DEDENT><DEDENT>
do a bit of validation of the notebook dir