我正在为gerrit创建本地存储库。
当我执行该命令时:
git-review -s它给我的错误是:
branch_parts = branch_name.split("/")
AttributeError: 'NoneType' object has no attribute 'split'有没有人能告诉我如何解决同样的问题?
发布于 2012-04-13 13:59:06
如果值为None,则会发生这种情况
In [119]: branch_name = None
In [120]: branch_parts = branch_name.split("/")
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/avasal/<ipython console> in <module>()
AttributeError: 'NoneType' object has no attribute 'split'确保branch_name中的值与预期一致
https://stackoverflow.com/questions/10135911
复制相似问题