Commit 87896786 authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Add an error message when no credentials can be found

parent fb9241fc
......@@ -30,6 +30,11 @@ int TJAlienConnectionManager::CreateConnection()
clearFlags();
if (creds.count() == 0) {
Error("TJAlienConnectionManager", "Failed to get any credentials");
return -1;
}
while (creds.count() > 0) {
if (creds.has(cJOB_TOKEN)) {
co = creds.get(cJOB_TOKEN);
......@@ -105,7 +110,7 @@ void TJAlienConnectionManager::ConnectJBox(TJAlienCredentialsObject c)
std::string jboxHost = std::getenv("JALIEN_HOST") ? : "";
int jboxPort = std::getenv("JALIEN_WSPORT") ? atoi(std::getenv("JALIEN_WSPORT")) : 0;
if (jboxHost.length() == 0 || jboxPort == 0) {
if (jboxHost.length() == 0 || jboxPort == 0) {
// Try to find jclient_token file
TJClientFile jcf;
if (jcf.isValid) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment