Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expand tar files in user sandbox. Fix #7661 #7680

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions scripts/CMSRunAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,14 @@ def extractUserSandbox(archiveJob, cmsswVersion):
# the PSet which is also in the user sandbox
os.chdir(cmsswVersion)
print(subprocess.getoutput('tar xfm %s ' % os.path.join('..', archiveJob)))
os.rename('PSet.py','../PSet.py')
os.rename('PSet.pkl','../PSet.pkl')
os.rename('PSet.py', '../PSet.py')
os.rename('PSet.pkl', '../PSet.pkl')
# if the sandbox contains tar files, expand them
files = subprocess.getoutput(f"tar tf ../{archiveJob}").split('\n')
for file in files:
if ('.tar.' in file) or file.endswith('.tar') or\
file.endswith('.tgz') or file.endswith('.tbz'):
print(subprocess.getoutput(f"tar xfm {file}"))
os.chdir('..')

def getProv(filename, scram):
Expand Down