equal
deleted
inserted
replaced
136 except KeyError: |
136 except KeyError: |
137 login, pwd = manager_userpasswd() |
137 login, pwd = manager_userpasswd() |
138 while True: |
138 while True: |
139 try: |
139 try: |
140 self.cnx = repoapi.connect(self.repo, login, password=pwd) |
140 self.cnx = repoapi.connect(self.repo, login, password=pwd) |
141 if not 'managers' in self.cnx.user.groups: |
141 with self.cnx: # needed to retrieve user's groups |
142 print('migration need an account in the managers group') |
142 if 'managers' not in self.cnx.user.groups: |
143 else: |
143 print('migration need an account in the managers group') |
144 break |
144 else: |
|
145 break |
|
146 self.cnx._open = None # XXX needed to reuse it later |
145 except AuthenticationError: |
147 except AuthenticationError: |
146 print('wrong user/password') |
148 print('wrong user/password') |
147 except (KeyboardInterrupt, EOFError): |
149 except (KeyboardInterrupt, EOFError): |
148 print('aborting...') |
150 print('aborting...') |
149 sys.exit(0) |
151 sys.exit(0) |