Commit ef82e982 authored by Zach Marshall's avatar Zach Marshall
Browse files

Using is_tarfile instead of relying on name (thanks Giordon)

parent fb4ed1ca
...@@ -67,8 +67,8 @@ else: ...@@ -67,8 +67,8 @@ else:
modify_param_card(process_dir=process_dir,params={'MASS':masses,'DECAY':decays}) modify_param_card(process_dir=process_dir,params={'MASS':masses,'DECAY':decays})
param_card_old = process_dir+'/Cards/param_card.dat' param_card_old = process_dir+'/Cards/param_card.dat'
ktdurham = -1 ktdurham = -1
if '.tar' in runArgs.inputGeneratorFile or '.tgz' in runArgs.inputGeneratorFile:
import tarfile import tarfile
if tarfile.is_tarfile(runArgs.inputGeneratorFile):
myTarball = tarfile.open(runArgs.inputGeneratorFile) myTarball = tarfile.open(runArgs.inputGeneratorFile)
myEvents = None myEvents = None
for afile in myTarball.getnames(): for afile in myTarball.getnames():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment