Skip to content

Commit b824146

Browse files
committed
Replace '/'.join with os.path.join
1 parent f1bab71 commit b824146

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/trivial-validate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def get_all_names_and_targets(ds):
165165
targets = set()
166166
for d in ds:
167167
for fi in os.listdir(d):
168-
fi = '/'.join([d, fi])
168+
fi = os.path.join(d, fi)
169169
try:
170170
tree = etree.parse(fi)
171171
ruleset_name = tree.xpath("/ruleset/@name")[0]
@@ -185,8 +185,8 @@ def nomes_all(where=sys.argv[1:]):
185185
yield i
186186
elif os.path.isdir(i):
187187
for r, d, f in os.walk(i):
188-
for fi in map(lambda x: '/'.join([r, x]), f):
189-
yield fi
188+
for fi in f:
189+
yield os.path.join(r, fi)
190190

191191
tests = [test_not_anchored, test_bad_regexp, test_unescaped_dots, test_missing_to,
192192
test_space_in_to, test_unencrypted_to, test_backslash_in_to,

0 commit comments

Comments
 (0)