从控制台执行post-commit脚本时出现python错误

时间:2015-06-01 20:00:58

标签: python svn post-commit svn-hooks

#sh post-commit

我收到了吼叫错误,如何解决这个问题。

sh post-commit

Traceback (most recent call last):
  File "/SVNData/testrepo/hooks/mailer.py", line 1353, in <module>
sys.argv[3:3+expected_args])
File "/usr/lib/python2.7/dist-packages/svn/core.py", line 281, in run_app
return func(application_pool, *args, **kw)
File "/SVNData/testrepo/hooks/mailer.py", line 81, in main
revision = int(cmd_args[0])
ValueError: invalid literal for int() with base 10: ''

感谢。

1 个答案:

答案 0 :(得分:0)

试试这个:

revision = int(''.join(cmd_args[0].split()))