Skip to content

Commit a7a2091

Browse files
committed
Make path detection in script more robust
1 parent b226b15 commit a7a2091

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Tools/import_translations.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import logging
55
import os
6-
import shutil
76

87
from xml.etree import ElementTree
98

@@ -22,11 +21,14 @@
2221

2322

2423
def pull_translations(parser):
25-
xliff_dirpath = os.path.dirname(
24+
xliff_dirpath = os.path.abspath(os.path.join(
25+
__file__, '..', '..',
2626
parser.get('macdown.macdownxliff', 'file_filter'),
27-
)
27+
'..',
28+
))
2829
for fn in os.listdir(xliff_dirpath):
2930
os.remove(os.path.join(xliff_dirpath, fn))
31+
logger.info('Connecting...')
3032
os.system('tx pull -a')
3133

3234

0 commit comments

Comments
 (0)