From 7b44a3d62704b11292c8c209468571823fdff20a Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Tue, 18 Aug 2015 17:14:03 +0200
Subject: [PATCH] Simplifications

---
 core/pymod/core/pm3argparse.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/core/pymod/core/pm3argparse.py b/core/pymod/core/pm3argparse.py
index dd4c981f..69601078 100644
--- a/core/pymod/core/pm3argparse.py
+++ b/core/pymod/core/pm3argparse.py
@@ -235,7 +235,9 @@ class PM3OptionsNamespace(object):
                                    "argument 'trg:' defining the "+
                                    "target sequence name, empty one "+
                                    "found: '%s'" % ' '.join(argstr), 14)
-        return trgname, seqfile
+        helper.FileExists("Alignment", 12, seqfile)
+        is_gz = helper.FileGzip("Alignment", 13, seqfile)
+        return trgname, seqfile, is_gz
 
     def _PostProcessAlignment(self):
         #pylint: disable=no-member
@@ -247,9 +249,7 @@ class PM3OptionsNamespace(object):
         self.alignments = seq.AlignmentList()
         if self.fasta:
             for src in self.fasta:
-                trgname, seqfile = self._FetchAlnFromFastaOpt(src)
-                helper.FileExists("Alignment", 12, seqfile)
-                is_gz = helper.FileGzip("Alignment", 13, seqfile)
+                trgname, seqfile, is_gz = self._FetchAlnFromFastaOpt(src)
                 readfile = seqfile
                 if is_gz:
                     zip_fh = gzip.open(seqfile)
-- 
GitLab