mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
Revert "component_information: add debug instrumentation for FileNotFoundError exception"
This reverts commit ca454c93d1.
This commit is contained in:
@@ -4,7 +4,6 @@ import argparse
|
||||
import json
|
||||
import lzma #to create .xz file
|
||||
import re
|
||||
import os
|
||||
|
||||
parser = argparse.ArgumentParser(description="""Generate the COMPONENT_GENERAL json file""")
|
||||
parser.add_argument('filename', metavar='component_general.json', help='JSON output file')
|
||||
@@ -76,14 +75,5 @@ component_general['metadataTypes'] = metadata_types
|
||||
with open(filename, 'w') as outfile:
|
||||
json.dump(component_general, outfile)
|
||||
|
||||
# DEBUG: in some cases writing the compressed file fails with 'No such file or directory'
|
||||
# even though it was just written above
|
||||
if not os.path.isfile(filename):
|
||||
print('{:} does not exist'.format(filename))
|
||||
|
||||
if compress:
|
||||
try:
|
||||
save_compressed(filename)
|
||||
except FileNotFoundError as e:
|
||||
print(os.listdir(os.path.dirname(filename)))
|
||||
raise
|
||||
save_compressed(filename)
|
||||
|
||||
Reference in New Issue
Block a user