• <small id='8zkOq'></small><noframes id='8zkOq'>

    <tfoot id='8zkOq'></tfoot>
      <i id='8zkOq'><tr id='8zkOq'><dt id='8zkOq'><q id='8zkOq'><span id='8zkOq'><b id='8zkOq'><form id='8zkOq'><ins id='8zkOq'></ins><ul id='8zkOq'></ul><sub id='8zkOq'></sub></form><legend id='8zkOq'></legend><bdo id='8zkOq'><pre id='8zkOq'><center id='8zkOq'></center></pre></bdo></b><th id='8zkOq'></th></span></q></dt></tr></i><div id='8zkOq'><tfoot id='8zkOq'></tfoot><dl id='8zkOq'><fieldset id='8zkOq'></fieldset></dl></div>

        <bdo id='8zkOq'></bdo><ul id='8zkOq'></ul>
      <legend id='8zkOq'><style id='8zkOq'><dir id='8zkOq'><q id='8zkOq'></q></dir></style></legend>

        对消息进行 grepping 时,bufsize 必须是整数错误

        时间:2023-07-22

          <small id='a4bKs'></small><noframes id='a4bKs'>

          • <legend id='a4bKs'><style id='a4bKs'><dir id='a4bKs'><q id='a4bKs'></q></dir></style></legend>
            • <bdo id='a4bKs'></bdo><ul id='a4bKs'></ul>

              <tfoot id='a4bKs'></tfoot>

                    <tbody id='a4bKs'></tbody>
                  <i id='a4bKs'><tr id='a4bKs'><dt id='a4bKs'><q id='a4bKs'><span id='a4bKs'><b id='a4bKs'><form id='a4bKs'><ins id='a4bKs'></ins><ul id='a4bKs'></ul><sub id='a4bKs'></sub></form><legend id='a4bKs'></legend><bdo id='a4bKs'><pre id='a4bKs'><center id='a4bKs'></center></pre></bdo></b><th id='a4bKs'></th></span></q></dt></tr></i><div id='a4bKs'><tfoot id='a4bKs'></tfoot><dl id='a4bKs'><fieldset id='a4bKs'></fieldset></dl></div>
                  本文介绍了对消息进行 grepping 时,bufsize 必须是整数错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在尝试使用 grep 查找日志中包含多行的消息时遇到以下错误...谁能提供有关如何克服此错误的输入?

                  I am running into following error while trying to grep for a message consisting of multipe lines in a log...can anyone provide inputs on how to overcome this error?

                  代码:-

                      print gerrit_commitmsg
                      gerritlog = Popen('git','log','--grep','gerrit_commitmsg', stdout=PIPE, stderr=PIPE)
                      print gerritlog
                  

                  错误:-

                  Commit message:-
                  
                  Build system changes
                  
                  Build system changes to include packages in the build
                  
                  Change-Id: I697558f01ae367d2baacdf2c7fcf1a03753edacd
                  
                  Traceback (most recent call last):
                    File "gerrits_in_workspace.py", line 87, in <module>
                      main()
                    File "gerrits_in_workspace.py", line 77, in main
                      grep_commitmsg(gerrit_commitmsg)
                    File "gerrits_in_workspace.py", line 48, in grep_commitmsg
                      gerritlog = Popen('git','log','--grep','gerrit_commitmsg', stdout=PIPE, stderr=PIPE)
                    File "/usr/lib/python2.7/subprocess.py", line 629, in __init__
                      raise TypeError("bufsize must be an integer")
                  

                  推荐答案

                  subprocess.Popen 类需要这样的参数列表:

                  The subprocess.Popen class expects an argument list like this:

                  Popen(args, bufsize=0, ...)
                  

                  所以你通过了它:

                  • args = git
                  • bufsize = 日志
                  • args = git
                  • bufsize = log

                  因此错误(bufsize 需要一个整数值).命令向量需要是一个列表,像这样:

                  Hence the error (bufsize expects an integer value). The command vector needs to be a list, like this:

                  gerritlog = Popen(['git','log','--grep','gerrit_commitmsg'], stdout=PIPE, stderr=PIPE)
                  

                  这篇关于对消息进行 grepping 时,bufsize 必须是整数错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:当父母在python中崩溃时杀死子进程 下一篇:解释来自 Python 子流程模块的示例管道

                  相关文章

                  <tfoot id='uF6ks'></tfoot>
                  1. <i id='uF6ks'><tr id='uF6ks'><dt id='uF6ks'><q id='uF6ks'><span id='uF6ks'><b id='uF6ks'><form id='uF6ks'><ins id='uF6ks'></ins><ul id='uF6ks'></ul><sub id='uF6ks'></sub></form><legend id='uF6ks'></legend><bdo id='uF6ks'><pre id='uF6ks'><center id='uF6ks'></center></pre></bdo></b><th id='uF6ks'></th></span></q></dt></tr></i><div id='uF6ks'><tfoot id='uF6ks'></tfoot><dl id='uF6ks'><fieldset id='uF6ks'></fieldset></dl></div>
                    <legend id='uF6ks'><style id='uF6ks'><dir id='uF6ks'><q id='uF6ks'></q></dir></style></legend>

                      <small id='uF6ks'></small><noframes id='uF6ks'>

                      • <bdo id='uF6ks'></bdo><ul id='uF6ks'></ul>