diff options
Diffstat (limited to 'python/scripts/slice2py.py')
-rwxr-xr-x | python/scripts/slice2py.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/python/scripts/slice2py.py b/python/scripts/slice2py.py index 2b04ce81c52..17b9eaeaad1 100755 --- a/python/scripts/slice2py.py +++ b/python/scripts/slice2py.py @@ -3,11 +3,19 @@ # Copyright (c) ZeroC, Inc. All rights reserved. # -import sys, Ice, IcePy +import sys +import Ice +import IcePy + + def main(): sliceDir = Ice.getSliceDir() # Automatically add the slice dir. - if not sliceDir is None: + if sliceDir is not None: sys.argv.append('-I' + sliceDir) val = IcePy.compile(sys.argv) sys.exit(int(val)) + + +if __name__ == "__main__": + sys.exit(main()) |