2

我正在为 gerrit 创建本地存储库。

当我执行命令时:

git-review -s

它给了我错误:

branch_parts = branch_name.split("/")
AttributeError: 'NoneType' object has no attribute 'split'

谁能让我知道如何解决这个问题?

4

1 回答 1

2

如果您的值是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符合预期

于 2012-04-13T05:59:05.993 回答