@@ -213,40 +213,33 @@ def main():
213213
214214 design = clmgr .CloneDesign (connection = conn )
215215
216- try :
217- design .clone_running = options .clone_running
218- get_original_guest (options .original_guest , options .original_xml ,
219- design )
220- get_clone_name (options .new_name , options .auto_clone , design )
221-
222- get_clone_macaddr (options .new_mac , design )
223- get_clone_uuid (options .new_uuid , design )
224- get_clone_sparse (options .sparse , design )
225- get_force_target (options .target , design )
226- get_preserve (options .preserve , design )
227-
228- # This determines the devices that need to be cloned, so that
229- # get_clone_diskfile knows how many new disk paths it needs
230- design .setup_original ()
231-
232- get_clone_diskfile (options .new_diskfile , design , conn ,
233- not options .preserve , options .auto_clone )
234-
235- # setup design object
236- design .setup ()
237-
238- # start cloning
239- meter = progress .TextMeter ()
240- clmgr .start_duplicate (design , meter )
241-
242- print _ ("\n Clone '%s' created successfully." ) % design .clone_name
243- logging .debug ("end clone" )
244- except RuntimeError , e :
245- fail (e )
246- except SystemExit , e :
247- sys .exit (e .code )
248- except Exception , e :
249- fail (e )
216+ design .clone_running = options .clone_running
217+ get_original_guest (options .original_guest , options .original_xml ,
218+ design )
219+ get_clone_name (options .new_name , options .auto_clone , design )
220+
221+ get_clone_macaddr (options .new_mac , design )
222+ get_clone_uuid (options .new_uuid , design )
223+ get_clone_sparse (options .sparse , design )
224+ get_force_target (options .target , design )
225+ get_preserve (options .preserve , design )
226+
227+ # This determines the devices that need to be cloned, so that
228+ # get_clone_diskfile knows how many new disk paths it needs
229+ design .setup_original ()
230+
231+ get_clone_diskfile (options .new_diskfile , design , conn ,
232+ not options .preserve , options .auto_clone )
233+
234+ # setup design object
235+ design .setup ()
236+
237+ # start cloning
238+ meter = progress .TextMeter ()
239+ clmgr .start_duplicate (design , meter )
240+
241+ print _ ("\n Clone '%s' created successfully." ) % design .clone_name
242+ logging .debug ("end clone" )
250243
251244if __name__ == "__main__" :
252245 try :
@@ -256,6 +249,5 @@ if __name__ == "__main__":
256249 except KeyboardInterrupt :
257250 print >> sys .stderr , _ ("Installation aborted at user request" )
258251 except Exception , main_e :
259- logging .exception (main_e )
260- sys .exit (1 )
252+ fail (main_e )
261253
0 commit comments