diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-17 21:29:26 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-17 21:29:26 +0200 |
commit | f737a39aaee66d363701bac9a3df7c1dc085f389 (patch) | |
tree | 8a19a049f2d7df4e24d4b50cdc2c0fad1880736a | |
parent | 3712f5f53675773bc9fc1fc947d4dca5ba238c78 (diff) |
tracking: Fix labels in track_status().
-rw-r--r-- | modules/tracking.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 5d10a24..89e3d49 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -160,20 +160,15 @@ class Module: for row in consignments: i = 0 if row.label: - label_header = True - results.append('Packages for \002%s\002:' % row.label) + label = ' (%s)' % row.label else: - label_header = False + label = '' + for package in row.packages: i += 1 date = package.last desc = package.status - if package.code == row.code and row.label: - label = ' (%s)' % row.label - else: - label = '' - if date and desc: s = '\002%s\002%s %s - %s' % (package.code, label, date, desc) else: @@ -182,16 +177,8 @@ class Module: results.append(s) if i == 0: - if row.label: - label = ' (%s)' % row.label - else: - label = '' results.append('No packages found for \002%s\002%s' % (row.code, label)) - if label_header: - del results[0] - label_header = False - if len(results): msg = results else: |