Skip to content

Commit

Permalink
Make path detection in script more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed May 11, 2017
1 parent b226b15 commit a7a2091
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Tools/import_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import logging
import os
import shutil

from xml.etree import ElementTree

Expand All @@ -22,11 +21,14 @@


def pull_translations(parser):
xliff_dirpath = os.path.dirname(
xliff_dirpath = os.path.abspath(os.path.join(
__file__, '..', '..',
parser.get('macdown.macdownxliff', 'file_filter'),
)
'..',
))
for fn in os.listdir(xliff_dirpath):
os.remove(os.path.join(xliff_dirpath, fn))
logger.info('Connecting...')
os.system('tx pull -a')


Expand Down

0 comments on commit a7a2091

Please sign in to comment.