ldcheck.py

changeset 36
2753aad79678
parent 34
7ed2e831acd4
child 38
66c9591b733d
equal deleted inserted replaced
35:865cd526e8b6 36:2753aad79678
38 yield Path(library_path_string).expanduser() 38 yield Path(library_path_string).expanduser()
39 39
40 def check_library_paths(config): 40 def check_library_paths(config):
41 from sys import exit 41 from sys import exit
42 problems = False 42 problems = False
43 have_paths = False
43 for library_path in library_paths(config): 44 for library_path in library_paths(config):
45 have_paths = True
44 if not library_path.exists(): 46 if not library_path.exists():
45 problems = True 47 problems = True
46 print(str.format( 48 print(str.format(
47 'Library path {} does not exist', 49 'Library path {} does not exist',
48 library_path, 50 library_path,
51 problems = True 53 problems = True
52 print(str.format( 54 print(str.format(
53 'Library path {} is not a directory', 55 'Library path {} is not a directory',
54 library_path, 56 library_path,
55 )) 57 ))
58 if not have_paths:
59 print('No LDraw path specified')
60 problems = True
56 if problems: 61 if problems:
57 print('Please fix ldcheck.cfg') 62 print('Please fix ldcheck.cfg')
58 exit(1) 63 exit(1)
59 64
60 def find_ldconfig_ldr_paths(config): 65 def find_ldconfig_ldr_paths(config):

mercurial