diff options
author | Harald Musum <musum@verizonmedia.com> | 2022-02-07 21:41:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 21:41:37 +0100 |
commit | cfcc21b3c0a27b873a7758cccd75ad61c34555ad (patch) | |
tree | 99062b01f5c2a0a2cd35f3b3ba0386c434a3f2f2 | |
parent | 15d76afc67c4fc9ccd940047dd73841452f21a1e (diff) | |
parent | 02e040a8c67b3ec4f20b6d279432e06012ad5d35 (diff) |
Merge pull request #21099 from vespa-engine/revert-21091-hmusum/check-if-file-can-be-opened
Revert "Fail if schema file cannot be opened"
-rw-r--r-- | config/src/apps/vespa-get-config/getconfig.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index 29c68d49da7..bc38eddc0dd 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -196,20 +196,15 @@ GetConfig::Main() schema = schemaString; } if (debugging) { - printf("Using schema from '%s'\n", schema.c_str()); + printf("Using schema in %s\n", schema.c_str()); } std::ifstream is; is.open(schema); std::string item; - if (is.is_open()) { - while (std::getline(is, item)) { - if (item.find("namespace=") == std::string::npos) { - defSchema.push_back(item); - } + while (std::getline(is, item)) { + if (item.find("namespace=") == std::string::npos) { + defSchema.push_back(item); } - } else { - fprintf(stderr, "Could not open schema file '%s'\n", schema.c_str()); - return 1; } is.close(); |