87460fb20c38d2dbf2da165ae8a8940fd15d5548,rasa/cli/utils.py,,check_path_exists,#Any#Any#Any#Any#,4

Before Change


                              "".format(default))
        print(""{}" does not exist. Please make sure to {}specify it with "{}"."
              "".format(current, default_clause, parameter))
        exit(1)

    return current

After Change



def check_path_exists(current, parameter, default=None, none_is_valid=False):
    if not (current is None and none_is_valid) and not os.path.exists(current):
        if os.path.exists(default):
            print(""{}" not found. Using default location "{}" instead."
                  "".format(current, default))
            current = default
        else:
            cancel_cause_not_found(current, parameter, default)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: RasaHQ/rasa
Commit Name: 87460fb20c38d2dbf2da165ae8a8940fd15d5548
Time: 2019-02-14
Author: t.wochinger@rasa.com
File Name: rasa/cli/utils.py
Class Name:
Method Name: check_path_exists


Project Name: NervanaSystems/nlp-architect
Commit Name: 650a9bb35b4b0796ee90c5ac0b498af54c32c2e3
Time: 2018-05-08
Author: peteriz@users.noreply.github.com
File Name: core_models/intent_extraction/interactive.py
Class Name:
Method Name:


Project Name: NervanaSystems/nlp-architect
Commit Name: 8e098ed186cf0c62dd01e1a02fd63b7d00443d89
Time: 2018-05-09
Author: peter.izsak@intel.com
File Name: core_models/intent_extraction/train_joint_model.py
Class Name:
Method Name: