[PATCH] stgit namelength is an integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Interpret stgit namelength as an integer, else the use of
name_len will fail with

  File "/usr/lib/python2.5/site-packages/stgit/utils.py", line 206, in patch_name_from_msg
    return re.sub('[\W]+', '-', subject_line).strip('-')[:name_len]
TypeError: slice indices must be integers or None or have an __index__ method

Signed-off-by: Pete Wyckoff <pw@xxxxxxxx>
---
 stgit/utils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stgit/utils.py b/stgit/utils.py
index 81035a5..1fa96c2 100644
--- a/stgit/utils.py
+++ b/stgit/utils.py
@@ -215,7 +215,7 @@ def patch_name_from_msg(msg):
     if not msg:
         return None
 
-    name_len = config.get('stgit.namelength')
+    name_len = config.getint('stgit.namelength')
     if not name_len:
         name_len = 30
 
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux