Skip to content

Commit b6c7ac6

Browse files
committed
Replacer: Remove dead code
1 parent 60cda3c commit b6c7ac6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/tox/config/__init__.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,16 +1801,11 @@ def _replace_match(self, match):
18011801
if not any(g.values()):
18021802
return os.pathsep
18031803

1804+
sub_type = g["sub_type"]
1805+
18041806
if sub_value == "posargs":
18051807
return self.reader.getposargs(match.group("default_value"))
18061808

1807-
try:
1808-
sub_type = g["sub_type"]
1809-
except KeyError:
1810-
raise tox.exception.ConfigError(
1811-
"Malformed substitution; no substitution type provided",
1812-
)
1813-
18141809
if not sub_type and not g["default_value"] and sub_value == "/":
18151810
return os.sep
18161811
if sub_type == "env":

0 commit comments

Comments
 (0)