diff --git a/Examples/options/export_detector_gdml.py b/Examples/options/export_detector_gdml.py index 948a88294..603050e82 100644 --- a/Examples/options/export_detector_gdml.py +++ b/Examples/options/export_detector_gdml.py @@ -30,4 +30,8 @@ geodumpservice.gdml = "DetFCCeeCLD.gdml" ApplicationMgr().ExtSvc += [geodumpservice] +# avoid error and remove output file if it already exists +if os.path.isfile(geodumpservice.gdml): + os.remove(geodumpservice.gdml) +