Skip to content

Commit

Permalink
Fix the previous bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Granroth-Wilding committed Apr 7, 2016
1 parent 89d7be0 commit bd3548b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/python/pimlico/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ def preprocess_config_file(filename, variant="main"):
if variant == "main":
config_lines.append(rest.lstrip())
elif directive.lower().startswith("variant:"):
variant_cond = directive[8:]
variant_conds = directive[8:].strip().split(",")
# Line conditional on a specific variant: include only if we're loading that variant
if variant_cond == variant:
if variant in variant_conds:
config_lines.append(rest.lstrip())
# Keep a list of all available variants
available_variants.add(variant_cond)
available_variants.update(variant_conds)
elif directive == "include":
# Include another file, given relative to this one
include_filename = os.path.abspath(os.path.join(os.path.dirname(filename), rest.strip("\n ")))
Expand Down
2 changes: 1 addition & 1 deletion src/python/pimlico/modules/corpora/tar_filter/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def tarballs(self):

if self._tarballs is None:
# Work out now what the archive names are going to look like and how many there will be
total_archives = math.ceil(float(len(self)) / self.archive_size)
total_archives = int(math.ceil(float(len(self)) / self.archive_size))

# Work out how many digits to pad the archive numbers with in the filenames
digits = len("%d" % (total_archives-1))
Expand Down

0 comments on commit bd3548b

Please sign in to comment.