Changeset 2786 for pykota/trunk/bin/pknotify
- Timestamp:
- 03/05/06 22:16:17 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pknotify
r2785 r2786 61 61 user. Then pknotify will output the result. 62 62 63 -C | --checkauth When --ask is used and an 'username' and a63 -C | --checkauth When --ask is used and both an 'username' and a 64 64 'password' are asked to the end user, then 65 65 pknotify will try to authenticate the user … … 67 67 will print "AUTH=YES", else "AUTH=NO". 68 68 If a field is missing, "AUTH=IMPOSSIBLE" will 69 be printed. 69 be printed. If the user is authenticated, then 70 "USERNAME=xxxx" will be printed as well. 70 71 71 72 -c | --confirm Tells pknotify to ask for either a confirmation … … 188 189 result = server.askDatas(labels, varnames, varvalues) 189 190 if result["isValid"] : 190 for varname in varnames : 191 result[varname] = result[varname].data 192 if (varname != "password") : 193 print "%s=%s" % (varname.upper(), result[varname]) 191 authok = None 194 192 if options["checkauth"] : 195 193 if ("username" in varnames) and ("password" in varnames) : 196 if self.checkAuth(result["username"] , result["password"]) :197 print"AUTH=YES"194 if self.checkAuth(result["username"].data, result["password"].data) : 195 authok = "AUTH=YES" 198 196 else : 199 print"AUTH=NO"197 authok = "AUTH=NO" 200 198 else : 201 print "AUTH=IMPOSSIBLE" 199 authok = "AUTH=IMPOSSIBLE" 200 for varname in varnames : 201 if (varname != "password") \ 202 and ((varname != "username") or (authok == "AUTH=YES")) : 203 print "%s=%s" % (varname.upper(), result[varname].data) 204 if authok is not None : 205 print authok 202 206 elif options["confirm"] : 203 207 print server.showDialog(self.sanitizeMessage(arguments[0]), True)