From 02e040a8c67b3ec4f20b6d279432e06012ad5d35 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Mon, 7 Feb 2022 21:36:09 +0100 Subject: Revert "Fail if schema file cannot be opened" --- config/src/apps/vespa-get-config/getconfig.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'config/src/apps/vespa-get-config/getconfig.cpp') 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(); -- cgit v1.2.3