summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2012-03-09 20:34:58 +0100
committerJan Pokorný <jpokorny@redhat.com>2012-03-09 20:34:58 +0100
commita94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff (patch)
tree2a241339b65cbdb99bd03519b18ae11c8f009243
parente3b4ba80be130bce4143151b4aa30bb44479c1c9 (diff)
downloadwatch-bz-a94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff.tar.gz
watch-bz-a94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff.tar.xz
watch-bz-a94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff.zip
minor changes (abbrev., control flow structure)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rwxr-xr-xtable-data11
-rwxr-xr-xwatch-bz2
2 files changed, 6 insertions, 7 deletions
diff --git a/table-data b/table-data
index e67e31a..2fc29e6 100755
--- a/table-data
+++ b/table-data
@@ -91,19 +91,18 @@ if __name__ == '__main__':
ret, data = '', []
start = time()
- # until timeout or EOF (read may block pass the timeout!)
+ # until timeout or EOF/empty line (read may block pass the timeout)
while (time() - start) < timeout:
ret = stdin.readline()
if not ret:
- break
+ break # huh, continue does not work?
data.append(ret)
- if not ret:
- tries += 1
- else:
- tries = 0
if not data:
+ tries += 1
continue
+
+ tries = 0
rows = [row.strip().split(sep) for row in data]
#print 'Without wrapping function\n'
diff --git a/watch-bz b/watch-bz
index aaf9667..ee5864a 100755
--- a/watch-bz
+++ b/watch-bz
@@ -36,7 +36,7 @@ watch -t --interval $REFRESH_INTERVAL \
"$BUGZILLA query -c $COMPONENT -t $STATUS --outputformat $OUTPUT_FMT \
| sed -u \
-e \"s/${SEP}Red Hat Enterprise Linux /${SEP}EL/\" \
- -e \"s/${SEP}Fedora/${SEP}fed/\" \
+ -e \"s/${SEP}Fedora/${SEP} F /\" \
-e \"s/${SEP}NEW/${SEP}N/\" \
-e \"s/${SEP}ASSIGNED/${SEP}A/\" \
-e \"s/${SEP}POST/${SEP}P/\" \