Skip to content

Commit

Permalink
ignore errors with os.chmod on non-unix file systems (ie, fat32)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Jan 11, 2015
1 parent 4a0d7d2 commit 49f60be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/novoalign.py
Expand Up @@ -87,5 +87,8 @@ def index_fasta(self, fasta):
cmd = [novoindex, outfname, fasta]
log.debug(' '.join(cmd))
subprocess.check_call(cmd)
mode = os.stat(outfname).st_mode & ~stat.S_IXUSR & ~stat.S_IXGRP & ~stat.S_IXOTH
os.chmod(outfname, mode)
try:
mode = os.stat(outfname).st_mode & ~stat.S_IXUSR & ~stat.S_IXGRP & ~stat.S_IXOTH
os.chmod(outfname, mode)
except PermissionError:
pass

0 comments on commit 49f60be

Please sign in to comment.