Skip to content

Commit beb6170

Browse files
John Kinsellachipchilders
authored andcommitted
Summary: Fix exception handling in security_group.py
Detail: Code was attempting to concatinate an exception to a string. Updated to convert to text and concatinate that. BUG-ID: CLOUDSTACK-1052 Bugfix-for: master Reported-by: Noa Resare Signed-off-by: John Kinsella <jlk@stratosec.co> 1363218769 -0700
1 parent 6928679 commit beb6170

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/vm/network/security_group.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import xml.dom.minidom
2626
from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError
2727
import re
28+
import traceback
29+
2830
iptables = Command("iptables")
2931
bash = Command("/bin/bash")
3032
virsh = Command("virsh")
@@ -692,7 +694,8 @@ def add_network_rules(vm_name, vm_id, vm_ip, signature, seqno, vmMac, rules, vif
692694

693695
return 'true'
694696
except:
695-
logging.debug("Failed to network rule !: " + sys.exc_type)
697+
exceptionText = traceback.format_exc()
698+
logging.debug("Failed to network rule !: " + exceptionText)
696699

697700
def getVifs(vmName):
698701
vifs = []

0 commit comments

Comments
 (0)