From 49f60bef0e54e498cfad835781f12f94b2ce0396 Mon Sep 17 00:00:00 2001 From: Danny Park Date: Sat, 10 Jan 2015 23:39:04 -0500 Subject: [PATCH] ignore errors with os.chmod on non-unix file systems (ie, fat32) --- tools/novoalign.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/novoalign.py b/tools/novoalign.py index 6259a94c3..c3e3a9991 100644 --- a/tools/novoalign.py +++ b/tools/novoalign.py @@ -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