[FIX] odoo.py windows compatibility
Prevent infinite loop when installing on windows Fixes #2825 Tested to work on * Git Bash v1.9.4 on Windows 8.1 Professional * Ubuntu 12.04.5 LTS
This commit is contained in:
parent
6e8b678667
commit
5544cf0036
4
odoo.py
4
odoo.py
|
@ -47,14 +47,14 @@ def git_locate():
|
||||||
os.chdir('odoo')
|
os.chdir('odoo')
|
||||||
|
|
||||||
path = os.getcwd()
|
path = os.getcwd()
|
||||||
while path != '/':
|
while path != os.path.abspath(os.sep):
|
||||||
gitconfig_path = os.path.join(path, '.git/config')
|
gitconfig_path = os.path.join(path, '.git/config')
|
||||||
if os.path.isfile(gitconfig_path):
|
if os.path.isfile(gitconfig_path):
|
||||||
release_py = os.path.join(path, 'openerp/release.py')
|
release_py = os.path.join(path, 'openerp/release.py')
|
||||||
if os.path.isfile(release_py):
|
if os.path.isfile(release_py):
|
||||||
break
|
break
|
||||||
path = os.path.dirname(path)
|
path = os.path.dirname(path)
|
||||||
if path == '/':
|
if path == os.path.abspath(os.sep):
|
||||||
path = None
|
path = None
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue