Skip to content

Commit

Permalink
Merge pull request #19 from shahab-sarmashghi/i18
Browse files Browse the repository at this point in the history
Fixing the issue with query -a when moving a dir to another file systems
  • Loading branch information
shahab-sarmashghi authored Jan 23, 2020
2 parents 8b1d1a7 + ffce8cb commit 1569a3e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions skmer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from subprocess import call, check_output, STDOUT
import multiprocessing as mp

__version__ = 'skmer 3.0.1'
__version__ = 'skmer 3.0.2'

# Hard-coded param
coverage_threshold = 5
Expand Down Expand Up @@ -440,9 +440,14 @@ def query(args):

# Adding query to the reference library
if args.a:
os.rename(sample_dir, os.path.join(args.library, sample))
else:
shutil.rmtree(sample_dir)
try:
shutil.copytree(sample_dir, os.path.join(args.library, sample))
except shutil.Error as e:
print('Directory not copied. Error: %s' % e)
except OSError as e:
print('Directory not copied. Error: %s' % e)

shutil.rmtree(sample_dir)


def main():
Expand Down

0 comments on commit 1569a3e

Please sign in to comment.