Show More
@@ -269,7 +269,7 b' class DbManage(object):' | |||
|
269 | 269 | email = defaults.get('email') |
|
270 | 270 | |
|
271 | 271 | if username is None: |
|
272 |
username = |
|
|
272 | username = input('Specify admin username:') | |
|
273 | 273 | if password is None: |
|
274 | 274 | password = self._get_admin_password() |
|
275 | 275 | if not password: |
@@ -278,7 +278,7 b' class DbManage(object):' | |||
|
278 | 278 | if not password: |
|
279 | 279 | sys.exit() |
|
280 | 280 | if email is None: |
|
281 |
email = |
|
|
281 | email = input('Specify admin email:') | |
|
282 | 282 | api_key = self.cli_args.get('api_key') |
|
283 | 283 | self.create_user(username, password, email, True, |
|
284 | 284 | strict_creation_check=False, |
@@ -517,7 +517,7 b' class DbManage(object):' | |||
|
517 | 517 | if _path is not None: |
|
518 | 518 | path = _path |
|
519 | 519 | elif not self.tests and not test_repo_path: |
|
520 |
path = |
|
|
520 | path = input( | |
|
521 | 521 | 'Enter a valid absolute path to store repositories. ' |
|
522 | 522 | 'All repositories in that path will be added automatically:' |
|
523 | 523 | ) |
@@ -291,14 +291,15 b' class _Page(list):' | |||
|
291 | 291 | # wrapper class can execute a query with the knowledge of what the |
|
292 | 292 | # slice will be (for efficiency) and, in the same query, ask for the |
|
293 | 293 | # total number of items and only execute one query. |
|
294 | ||
|
294 | 295 | try: |
|
295 | 296 | first = (self.page - 1) * items_per_page |
|
296 | 297 | last = first + items_per_page |
|
297 | 298 | self.items = list(self.collection[first:last]) |
|
298 | 299 | except TypeError as err: |
|
299 | 300 | raise TypeError( |
|
300 | "Your collection of type {} cannot be handled " | |
|
301 |
"by paginate. ERROR:{}" |
|
|
301 | f"Your collection of type {type(self.collection)} cannot be handled " | |
|
302 | f"by paginate. ERROR:{err}" | |
|
302 | 303 | ) |
|
303 | 304 | |
|
304 | 305 | # Unless the user tells us how many items the collections has |
General Comments 0
You need to be logged in to leave comments.
Login now