From c0ed28a762181ac02b3c03bc5455285c4d756bb6 Mon Sep 17 00:00:00 2001 From: gtdang <53052793+gtdang@users.noreply.github.com> Date: Mon, 14 Dec 2020 20:00:11 -0500 Subject: [PATCH] Update fig pager saving file type bug (#15) * Update figpager.py Unindented file type hold out of isfile() conditional. Previously, the file type was not being saved in cases of new files. This resulted in single pages of new multipage files. --- .gitignore | 3 +++ figpager/figpager.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b358f20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +*.iml +*.xml diff --git a/figpager/figpager.py b/figpager/figpager.py index 02527f2..34c5342 100755 --- a/figpager/figpager.py +++ b/figpager/figpager.py @@ -161,8 +161,8 @@ def __init__( raise IOError( "Output file already exists and user chose not to overwrite." ) - # hold file type - self.type = os.path.splitext(outfile)[1][1:] + # hold file type + self.type = os.path.splitext(outfile)[1][1:] # hold outfile full path self.outfile = outfile