File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ def apps_count(self):
109
109
110
110
@cached_property
111
111
def __get_apps (self ):
112
- return self .client .get_installed_apps ()
112
+ try :
113
+ return self .client .get_installed_apps ()
114
+ except Exception as e :
115
+ print (f'ERROR: Could not get the installed applications. Error: { e } ' )
116
+ return []
113
117
114
118
@cached_property
115
119
def __get_custom_apps (self ):
Original file line number Diff line number Diff line change @@ -178,14 +178,17 @@ def __check_license(client):
178
178
179
179
180
180
def __check_number_of_custom_app (client ):
181
- all_apps = client .get_installed_apps ()
182
- apps_with_vendor_defined = [app for app in all_apps if 'vendor' in app ]
183
- non_atlassian_apps = [app for app in apps_with_vendor_defined if 'Atlassian' not in
184
- app ['vendor' ]['name' ] and app ['userInstalled' ] == True ]
185
- non_atlassian_apps_names = [app ['name' ] for app in non_atlassian_apps ]
186
- print (f"Custom application count: { len (non_atlassian_apps )} " )
187
- print (f'Custom app names:' )
188
- print (* non_atlassian_apps_names , sep = '\n ' )
181
+ try :
182
+ all_apps = client .get_installed_apps ()
183
+ apps_with_vendor_defined = [app for app in all_apps if 'vendor' in app ]
184
+ non_atlassian_apps = [app for app in apps_with_vendor_defined if 'Atlassian' not in
185
+ app ['vendor' ]['name' ] and app ['userInstalled' ] == True ]
186
+ non_atlassian_apps_names = [app ['name' ] for app in non_atlassian_apps ]
187
+ print (f"Custom application count: { len (non_atlassian_apps )} " )
188
+ print (f'Custom app names:' )
189
+ print (* non_atlassian_apps_names , sep = '\n ' )
190
+ except Exception as e :
191
+ print (f'ERROR: Could not get the installed applications. Error: { e } ' )
189
192
190
193
191
194
You can’t perform that action at this time.
0 commit comments