xbmcgui.Dialog().ok( addon_name, "Couldn't delete one of the key or certificate files:\n" + path) # Fetch the directory list again user_keys = getUserKeys(provider) user_certs = getUserCerts(provider) if len(user_keys) == 0 and len(user_certs) == 0: xbmcgui.Dialog().ok( addon_name, "All key and certificate files for " + provider_display + " have been deleted.") else: still_deleting = False else: xbmcgui.Dialog().ok( addon_name, "No key and certificate files exist for " + provider_display + ".") # Fix the user defined files with DNS goodness if action == "dns": dnsFix() command = "Addon.OpenSettings(" + getID() + ")" xbmc.executebuiltin(command) else: errorTrace("managefiles.py", "VPN service is not ready") debugTrace("-- Exit managefiles.py --")
xbmcvfs.delete(path + ".key") if xbmcvfs.exists(path + ".txt"): xbmcvfs.delete(path + ".txt") if xbmcvfs.exists(path + ".crt"): xbmcvfs.delete(path + ".crt") except: xbmcgui.Dialog().ok(addon_name, "Couldn't delete one of the key or certificate files: " + path) # Fetch the directory list again user_keys = getUserKeys(provider) user_certs = getUserCerts(provider) if len(user_keys) == 0 and len(user_certs) == 0: xbmcgui.Dialog().ok(addon_name, "All key and certificate files for " + provider_display + " have been deleted.") else: still_deleting = False else: xbmcgui.Dialog().ok(addon_name, "No key and certificate files exist for " + provider_display + ".") # Fix the user defined files with DNS goodness if action == "dns": dnsFix() command = "Addon.OpenSettings(" + getID() + ")" xbmc.executebuiltin(command) else: errorTrace("managefiles.py", "VPN service is not ready") debugTrace("-- Exit managefiles.py --")