Skip to content

Commit

Permalink
Merge pull request PGScatalog#321 from ens-lgil/hotfix/copy_hm_files
Browse files Browse the repository at this point in the history
Catch chmod error with the copy of the Harmonized files
  • Loading branch information
ens-lgil authored Dec 18, 2023
2 parents 5007069 + c2eba6d commit 0659818
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions release/scripts/CopyHarmonizedScoringFilesPOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ def copy_harmonized_files_to_production(self):
if os.path.isdir(harmonized_file_prod_dir):
shutil.copy2(harmonized_file_staged, harmonized_file_prod)
# Change chmod to allow group write access
os.chmod(harmonized_file_prod, stat.S_IRUSR|stat.S_IWUSR|stat.S_IRGRP|stat.S_IWGRP|stat.S_IROTH)
print(copy_msg)
try:
os.chmod(harmonized_file_prod, stat.S_IRUSR|stat.S_IWUSR|stat.S_IRGRP|stat.S_IWGRP|stat.S_IROTH)
print(copy_msg)
except:
print(f">>>>> ERROR! Can't change the read/write access of the file '{harmonized_file}'!")

file_info = { 'genebuild': gb, 'name': harmonized_file, 'status': copy_type }
if not pgs_id in self.harmonized_files_to_copy:
Expand Down

0 comments on commit 0659818

Please sign in to comment.