force current directory to match the script (#4595)

This commit is contained in:
Frédéric Péters 2014-03-28 11:31:30 +01:00
parent 633e083b44
commit a795cdc0c0
1 changed files with 4 additions and 0 deletions

View File

@ -144,6 +144,10 @@ def main():
parser.add_option('--pid', dest='pid')
options, args = parser.parse_args()
# force current directory to match the script, to make sure it finds the
# various tools (legi2pdf & odf2legi)
os.chdir(os.path.abspath(os.path.dirname(__file__)))
if not os.path.exists('../legi2pdf/script/db2pdf.py'):
print >> sys.stderr, 'W: legi2pdf not found'