diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-01-12 13:43:22 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-01-12 13:51:42 -0800 |
| commit | a44d74d75294e358e501cc83fd35e6a5e50ebf0b (patch) | |
| tree | 31655308f7a3efbe8bcebe217475414c006641a2 /build-aux | |
| parent | 6eb59a8f0aca761d4798d8197709b45801968065 (diff) | |
| download | openvswitch-a44d74d75294e358e501cc83fd35e6a5e50ebf0b.tar.gz | |
python: Use os.path.basename instead of open-coding it.
Reported-by: Justin Pettit <jpettit@nicira.com>
Diffstat (limited to 'build-aux')
| -rwxr-xr-x | build-aux/check-structs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/build-aux/check-structs b/build-aux/check-structs index f582e2bd7..536045fe4 100755 --- a/build-aux/check-structs +++ b/build-aux/check-structs @@ -1,5 +1,6 @@ #! /usr/bin/python +import os.path import sys import re @@ -193,10 +194,7 @@ def checkStructs(): sys.exit(1) if '--help' in sys.argv: - argv0 = sys.argv[0] - slash = argv0.rfind('/') - if slash: - argv0 = argv0[slash + 1:] + argv0 = os.path.basename(sys.argv[0]) print '''\ %(argv0)s, for checking struct and struct member alignment usage: %(argv0)s HEADER [HEADER]... |
