diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2012-03-09 20:34:58 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2012-03-09 20:34:58 +0100 |
commit | a94ad9f4c87f6dfb7a060201c6bd4c7023ffdfff (patch) | |
tree | 2a241339b65cbdb99bd03519b18ae11c8f009243 | |
parent | e3b4ba80be130bce4143151b4aa30bb44479c1c9 (diff) | |
download | watch-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-x | table-data | 11 | ||||
-rwxr-xr-x | watch-bz | 2 |
2 files changed, 6 insertions, 7 deletions
@@ -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' @@ -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/\" \ |