##// END OF EJS Templates
factotum: convert Plan 9 quoted string to Python string
David Eckhardt -
r23393:c834c019 default
parent child Browse files
Show More
@@ -72,9 +72,14 b' def auth_getuserpasswd(self, getkey, par'
72 l = os.read(fd, ERRMAX).split()
72 l = os.read(fd, ERRMAX).split()
73 if l[0] == 'ok':
73 if l[0] == 'ok':
74 os.write(fd, 'read')
74 os.write(fd, 'read')
75 l = os.read(fd, ERRMAX).split()
75 status, user, passwd = os.read(fd, ERRMAX).split(None, 2)
76 if l[0] == 'ok':
76 if status == 'ok':
77 return l[1:]
77 if passwd.startswith("'"):
78 if passwd.endswith("'"):
79 passwd = passwd[1:-1].replace("''", "'")
80 else:
81 raise util.Abort(_('malformed password string'))
82 return (user, passwd)
78 except (OSError, IOError):
83 except (OSError, IOError):
79 raise util.Abort(_('factotum not responding'))
84 raise util.Abort(_('factotum not responding'))
80 finally:
85 finally:
General Comments 0
You need to be logged in to leave comments. Login now