Skip to content

Commit a2cf253

Browse files
committed
bug 5876: Fix error reporting in agent setup so it will not cause a nested exception
The function stderr was being called with the wrong name of interpolation parameters. The exception was missing from the arguments to the function. status 5876: resolved fixed
1 parent b97899b commit a2cf253

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/lib/cloud_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def setup_agent_config(configfile, host, zone, pod):
943943
confopts["zone"] = zone
944944
confopts["pod"] = pod
945945
except (urllib2.URLError,urllib2.HTTPError),e:
946-
stderr("Query failed: %s. Defaulting to zone %s pod %s",confopts["zone"],confopts["pod"])
946+
stderr("Query failed: %s. Defaulting to zone %s pod %s",str(e),confopts["zone"],confopts["pod"])
947947

948948
for opt,val in confopts.items():
949949
line = "=".join([opt,val])
@@ -988,7 +988,7 @@ def setup_consoleproxy_config(configfile, host, zone, pod):
988988
confopts["zone"] = zone
989989
confopts["pod"] = pod
990990
except (urllib2.URLError,urllib2.HTTPError),e:
991-
stderr("Query failed: %s. Defaulting to zone %s pod %s",e,confopts["zone"],confopts["pod"])
991+
stderr("Query failed: %s. Defaulting to zone %s pod %s",str(e),confopts["zone"],confopts["pod"])
992992

993993
for opt,val in confopts.items():
994994
line = "=".join([opt,val])

0 commit comments

Comments
 (0)