From 2d507fd17a2519fc48c2116fcb9b9ac6f9e613bf Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 9 Apr 2015 10:27:50 +0200 Subject: [PATCH] Fix crash if IOU initial config is emtpy Fix #147 --- gns3server/modules/iou/iou_vm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/iou/iou_vm.py b/gns3server/modules/iou/iou_vm.py index 1bc6a9c0..d8d47a33 100644 --- a/gns3server/modules/iou/iou_vm.py +++ b/gns3server/modules/iou/iou_vm.py @@ -996,6 +996,9 @@ class IOUVM(BaseVM): try: script_file = os.path.join(self.working_dir, "initial-config.cfg") + if initial_config is None: + initial_config = '' + # We disallow erasing the initial config file if len(initial_config) == 0 and os.path.exists(script_file): return @@ -1068,7 +1071,6 @@ class IOUVM(BaseVM): raise IOUError("Packet capture is already activated on {adapter_number}/{port_number}".format(adapter_number=adapter_number, port_number=port_number)) - nio.startPacketCapture(output_file, data_link_type) log.info('IOU "{name}" [{id}]: starting packet capture on {adapter_number}/{port_number}'.format(name=self._name, id=self._id,