Skip to content

Commit df77604

Browse files
author
Wang Xiaolei
committed
Only import valid framework headers.
1 parent 896c9cc commit df77604

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

longest.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def outputLongestNames(title, names):
5050
for framework_dir in os.listdir(frameworks_root):
5151
framework, ext = os.path.splitext(framework_dir)
5252
if ext == '.framework':
53-
all_headers += '#import <%s/%s.h>\n' % (framework, framework)
53+
header_path = os.path.join(frameworks_root, framework_dir, 'Headers', framework + '.h')
54+
if os.path.exists(header_path):
55+
all_headers += '#import <%s/%s.h>\n' % (framework, framework)
5456

5557
import_filename = 'ImportAll.h'
5658
with open(import_filename, 'w') as import_file:

0 commit comments

Comments
 (0)