diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 01:13:30 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 01:13:30 +0000 |
commit | 5df92b10fa96153a266e0f39a006810233315b3d (patch) | |
tree | f8fa56d08d4405c555e02359d8552597a2839481 /third_party/ffmpeg | |
parent | 9ba163874e45d59edd638ea5b309e125b81ae4ea (diff) | |
download | chromium_src-5df92b10fa96153a266e0f39a006810233315b3d.zip chromium_src-5df92b10fa96153a266e0f39a006810233315b3d.tar.gz chromium_src-5df92b10fa96153a266e0f39a006810233315b3d.tar.bz2 |
Define all file handles so if open fails, we can still test for the variable.
Review URL: http://codereview.chromium.org/122013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/ffmpeg')
-rwxr-xr-x | third_party/ffmpeg/generate_stubs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/ffmpeg/generate_stubs.py b/third_party/ffmpeg/generate_stubs.py index b1a6385..5e37157 100755 --- a/third_party/ffmpeg/generate_stubs.py +++ b/third_party/ffmpeg/generate_stubs.py @@ -774,6 +774,7 @@ def main(): if options.type == FILE_TYPE_WIN: for input_path in args: + infile = None try: infile = open(input_path, 'r') signatures = ParseSignatures(infile) @@ -797,6 +798,7 @@ def main(): os.path.basename(header_path)) # First create the implementation file. + impl_file = None try: # Open the file, and create the preamble which consists of a file # header plus any necessary includes. @@ -804,6 +806,7 @@ def main(): PosixStubWriter.WriteImplementationPreamble(header_include_path, impl_file) if options.extra_stub_header is not None: + extra_header_file = None try: impl_file.write('\n') extra_header_file = open(options.extra_stub_header, 'r') @@ -818,6 +821,7 @@ def main(): # for that file. Each file represents one module. for input_path in args: name = ExtractModuleName(input_path) + infile = None try: infile = open(input_path, 'r') signatures = ParseSignatures(infile) @@ -835,6 +839,7 @@ def main(): impl_file.close() # Then create the associated header file. + header_file = None try: header_file = open(header_path, 'w') PosixStubWriter.WriteHeaderContents(module_names, namespace, |