Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless recursion fix for windows... #71

Merged
merged 1 commit into from
Jul 30, 2012
Merged

Endless recursion fix for windows... #71

merged 1 commit into from
Jul 30, 2012

Conversation

vpa
Copy link
Contributor

@vpa vpa commented Jul 30, 2012

On Windows OpenOffice/LibreOffice are two python binaries within the basepath:

(1) C:\Program Files (x86)\OpenOffice.org 3\program\python.exe
(2) C:\Program Files (x86)\OpenOffice.org 3\Basis\program\python-core-2.6.1\bin\python.exe

find_offices() always finds (1) as office python, while unopath is always set to
'C:\Program Files (x86)\OpenOffice.org 3\Basis\program'.

Thus "sys.executable.startswith(of._uno_path)" is always "False", which leads to an endless
(recursive) restart in python_switch() (at least on Windows).

To fix this call only python_switch() as long no python binary from within _base_path
is executed.

--vpa

On Windows OpenOffice/LibreOffice are two python binaries within the basepath:
 (1) C:\Program Files (x86)\OpenOffice.org 3\program\python.exe
 (2) C:\Program Files (x86)\OpenOffice.org 3\Basis\program\python-core-2.6.1\bin\python.exe
            
find_offices() always finds (1) as office python, while unopath is always set to
'C:\Program Files (x86)\OpenOffice.org 3\Basis\program'.

Thus "sys.executable.startswith(of.*uno*path)" is always "False", which leads to an endless
(recursive) restart in python_switch() (at least on Windows). 
            
To fix this call only python_switch() as long no python binary from within *base*path
is executed.

--vpa
@ghost ghost assigned dagwieers Jul 30, 2012
@dagwieers dagwieers closed this Jul 30, 2012
dagwieers added a commit that referenced this pull request Jul 30, 2012
Endless recursion fix for windows...
@dagwieers dagwieers merged commit 0307fa4 into unoconv:master Jul 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants