Пример #1
0
def setPath():
	path = questionDialog("Invalid setting: please specify the NetworkManager path for VPN-Connection-Settings on your system.", defaultPath)
	if not os.path.exists(path):
			errorDialog("Error: the path " + path + " doesn't exist. Please make sure you entered the right values, check the tool configuration (" + defaultFile + ") and rerun this tool!")
			exit("Error: Setup failed (invalid VPN config path)")
	print("Using " + path + " as NM path.")
	return path
Пример #2
0
def checkPath(path, conID):
	if(os.path.exists(path)):
			print("Using " + path + " as vpn config path.")
			infoDialog("This Tool will look for your VPN Connection settings at " + path + ". If you need to change this, use the Tool Menu. (Connection -> Tool Settings)")
	else:
		print("Error: File not found at " + path)
		nmPath = questionDialog("No file found at " + path + "\nPlease specify the NetworkManager path for VPN-Connection-Settings on your system.", defaultPath)
		path = nmPath + conID
		if not os.path.exists(path):
			errorDialog("Error: no VPN configfile found at " + path + ". Please make sure you entered the right values and created the PP VPN connection in NetworkManager and rerun this tool!")
			exit("Error: Setup failed (invalid VPN config file)")
	return path
Пример #3
0
def setOvpnFolder():
	path = questionDialog("You choose openvpn as connection type. PP Config Tool will use the openvpn configuration files from the PP member downloads. Please get that package (https://www.perfect-privacy.com/members/All.ovpn.ubuntu.zip), extract it and input the path of that folder below:", os.path.expanduser("~/Downloads/All.ovpn.ubuntu"))
	if not os.path.exists(path):
			errorDialog("Error: the path " + path + " doesn't exist. Please make sure you entered the right values, check the tool configuration (" + defaultFile + ") and rerun this tool!")
			exit("Error: Setup failed (invalid VPN config path)")
	return path
Пример #4
0
def setEditor():
	return questionDialog("Please input your prefered (graphical) Editor:", defaultEditor)		
Пример #5
0
def setID():
	return questionDialog("Please input the name (ID) of your VPN Connection", defaultID)