Issue #260: JSON-RPC get_repos fails if any repository is locked (conservancy/kallithea)

Brandon Jones issues-reply at bitbucket.org
Sun Dec 18 01:57:08 UTC 2016


New issue 260: JSON-RPC get_repos fails if any repository is locked
https://bitbucket.org/conservancy/kallithea/issues/260/json-rpc-get_repos-fails-if-any-repository

Brandon Jones:

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


```
#!python

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.




More information about the kallithea-general mailing list