Chandan Singh pushed to branch chandan/toxic-man at BuildStream / buildstream
Commits:
-
a17ebd24
by Chandan Singh at 2019-01-25T13:22:22Z
1 changed file:
Changes:
... | ... | @@ -109,8 +109,12 @@ def check_for_bwrap(): |
109 | 109 |
def list_man_pages():
|
110 | 110 |
bst_dir = os.path.dirname(os.path.abspath(__file__))
|
111 | 111 |
man_dir = os.path.join(bst_dir, 'man')
|
112 |
- man_pages = os.listdir(man_dir)
|
|
113 |
- return [os.path.join('man', page) for page in man_pages]
|
|
112 |
+ try:
|
|
113 |
+ man_pages = os.listdir(man_dir)
|
|
114 |
+ return [os.path.join('man', page) for page in man_pages]
|
|
115 |
+ except FileNotFoundError:
|
|
116 |
+ # Do not error out when 'man' directory does not exist
|
|
117 |
+ return []
|
|
114 | 118 |
|
115 | 119 |
|
116 | 120 |
#####################################################
|