diff --git a/upgrade b/upgrade index 2cfc36c..ddba41a 100755 --- a/upgrade +++ b/upgrade @@ -20,7 +20,7 @@ def get_url(): def run(*args): print 'RUNING:', ' '.join(args) - summary = [] + summary = set() process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=1) #for line in iter(process.stdout.readline, b''): @@ -28,16 +28,16 @@ def run(*args): line = line.strip() if 'ERROR' in line: line = t.red(line) - summary.append(line) + summary.add(line) elif 'WARNING' in line: line = t.yellow(line) - summary.append(line) + summary.add(line) print line process.stdout.close() process.wait() if summary: print t.bold('\nWARNING AND ERROR SUMMARY:') - print '\n'.join(summary) + print '\n'.join(sorted(list(summary))) return process.returncode def execute(query, *args, **kwargs):