JSON-RPC get_repos fails if any repository is locked

Issue #260 resolved
Brandon Jones created an issue

When calling the get_repos API command, it is returning this error.

016-12-17 20:51:11.273 ERROR [JSONRPC] Encountered unhandled exception: Traceback (most recent call last):
  File "c:\kallithea\env\lib\site-packages\kallithea\controllers\api\__init__.py", line 256, in _dispatch_call
    raw_response = self._inspect_call(self._func)
  File "c:\kallithea\env\lib\site-packages\pylons\controllers\core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "c:\kallithea\env\lib\site-packages\pylons\controllers\core.py", line 57, in _perform_call
    return func(**args)
  File "c:\kallithea\env\lib\site-packages\kallithea\controllers\api\api.py", line 1330, in get_repos
    result.append(repo.get_api_data())
  File "c:\kallithea\env\lib\site-packages\kallithea\model\db.py", line 1234, in get_api_data
    if self.locked[0] else None,
AttributeError: 'NoneType' object has no attribute 'get_api_data'

Four repositories in my installation had locking enabled and were locked when that error was generated. Once I removed those locks, the get_repos command worked fine.

Comments (5)

  1. Brandon Jones reporter

    Was not able to reproduce as a test case. Must be specific to my implementation - very possible that something got mixed up when I migrated from RhodeCode 1.5.2.

  2. Log in to comment