summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-06-22 22:03:49 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-06-22 22:03:49 +0000
commit8f932afc9865c0276c62166ca14290f99b4c489d (patch)
treed7d6954fa07e2e1a63b921adfd233d56658eef16 /src/sbin
parentfa9f59159a8ae0feceb8dd6d3a3b878e0b660a71 (diff)
downloadbcfg2-8f932afc9865c0276c62166ca14290f99b4c489d.tar.gz
bcfg2-8f932afc9865c0276c62166ca14290f99b4c489d.tar.bz2
bcfg2-8f932afc9865c0276c62166ca14290f99b4c489d.zip
add error handling if server connection failure occurs
(Logical change 1.237) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@994 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rw-r--r--src/sbin/bcfg26
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 734a16821..642bc7999 100644
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -83,7 +83,11 @@ if __name__ == '__main__':
else:
# connect to bcfg2d
comm = comm_lib()
- h = comm.ClientInit("bcfg2")
+ try:
+ h = comm.ClientInit("bcfg2")
+ except:
+ print "Failed to connect to bcfg2 server"
+ raise SystemExit, 1
# get probes
comm.SendMessage(h, "<get-probes/>")