如果我创建一个文件,如:
import os
print os.getlogin()
并用cron运行它,我得到一个例外
print os.getlogin()
OSError: [Errno 22] Invalid argument
如果我在 shell 中手动运行它——它可以工作。
问题是,commit() 中的 GitPython 0.3.1 使用了这个函数,我需要使用它。
有什么解决方法吗?
我已经在 Ubuntu10.10/python2.6.6 和 Debian5.0.6/python2.5.2 上测试过了。