Skip to content

Commit

Permalink
simple make batch script executable
Browse files Browse the repository at this point in the history
  • Loading branch information
maurov committed Aug 1, 2024
1 parent 91497a4 commit 7b49de7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions larch/xrd/struct2xas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

# main imports
import os
import stat
import json
import time
from dataclasses import dataclass
Expand Down Expand Up @@ -1019,13 +1018,7 @@ def make_sbatch(self, template: str, **kwargs):
with open(batch_script, "w") as fp, open(template) as tp:
fp.write(tp.read().format(**kwargs))
logger.info(f"written {fp.name}")

# Make the SLURM batch script executable.
current_permissions = os.stat(batch_script)
os.chmod(
batch_script,
current_permissions.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH,
)
os.chmod(batch_script, 0o755)

def make_input_feff(
self,
Expand Down

0 comments on commit 7b49de7

Please sign in to comment.