Fixed bug in 'oe' script when passing no arguments

When no arguments passed to 'oe' script next exception was thrown:

```
Traceback (most recent call last):
  File "./oe", line 5, in <module>
    if sys.argv[1] == 'run-tests':
IndexError: list index out of range
```
This commit is contained in:
Дмитро Катюха 2014-05-19 15:06:59 +03:00
parent f1a1c6e988
commit 7d12d4aaa1
1 changed files with 1 additions and 1 deletions

2
oe
View File

@ -2,7 +2,7 @@
if __name__ == '__main__':
import sys
if sys.argv[1] == 'run-tests':
if len(sys.argv) > 1 and sys.argv[1] == 'run-tests':
sys.exit(0)
import openerpcommand.main
openerpcommand.main.run()