aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2012-02-05 14:43:06 +0100
committerThomas Kahle <tomka@gentoo.org>2012-02-05 14:43:06 +0100
commit56bbe7d8242a25a5f3e8ab4273fb9abe1b0deec2 (patch)
tree7285e2dd9548caebf15fdab5f8249353590a900d /scripts
parentInitial support for keywording bugs (also via -b) (diff)
downloadtatt-56bbe7d8242a25a5f3e8ab4273fb9abe1b0deec2.tar.gz
tatt-56bbe7d8242a25a5f3e8ab4273fb9abe1b0deec2.tar.bz2
tatt-56bbe7d8242a25a5f3e8ab4273fb9abe1b0deec2.zip
Fix bug type detection with -f
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tatt30
1 files changed, 14 insertions, 16 deletions
diff --git a/scripts/tatt b/scripts/tatt
index 2d5c0c6..b4546c6 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -127,24 +127,22 @@ if options.infile:
if options.bugnum:
print("Bugnumber: " + options.bugnum)
myJob.bugnumber=options.bugnum
+ p1 = Popen(['bugz', 'get', myJob.bugnumber, '-n'], stdout=PIPE)
+ # Instead we now capture everything:
+ bugraw = p1.communicate()[0]
+ if re.search('KEYWORDREQ', bugraw):
+ # This is a keywording bug:
+ print ("Keywording bug detected.")
+ myJob.type="keyword"
+ elif re.search('STABLEREQ', bugraw):
+ # Stablebug
+ print ("Stabilization bug detected.")
+ myJob.type="stable"
+ else:
+ print ("Could not detect bug's type, is the 'Keywords' field set?")
+ exit(1)
# If myJob.packageList is still empty we search in the bug-title
if myJob.packageList==None:
- p1 = Popen(['bugz', 'get', myJob.bugnumber, '-n'], stdout=PIPE)
- #This old call would just fetch the title
- #bugraw = Popen(['grep', 'Title'], stdin=p1.stdout, stdout=PIPE).communicate()[0]
- # Instead we now capture everything:
- bugraw = p1.communicate()[0]
- if re.search('KEYWORDREQ', bugraw):
- # This is a keywording bug:
- print ("Keywording bug detected.")
- myJob.type="keyword"
- elif re.search('STABLEREQ', bugraw):
- # Stablebug
- print ("Stabilization bug detected.")
- myJob.type="stable"
- else:
- print ("Could not detect bug's type, is the 'Keywords' field set?")
- exit(1)
myJob.packageList = packageFinder.findPackages(bugraw, re.compile(config['atom-regexp']))
# joint code for -f and -b