diff options
author | 2012-01-21 18:05:00 +0100 | |
---|---|---|
committer | 2012-01-21 18:05:00 +0100 | |
commit | ec5a1892fb2d15238a303ccf0ef153cd817d140b (patch) | |
tree | 3baa3b2d466face3f4e3f26363bbf4fd5fd8de0b | |
parent | Properly handle simultaneous stabilization of multiple packages (diff) | |
download | arch-tools-ec5a1892fb2d15238a303ccf0ef153cd817d140b.tar.gz arch-tools-ec5a1892fb2d15238a303ccf0ef153cd817d140b.tar.bz2 arch-tools-ec5a1892fb2d15238a303ccf0ef153cd817d140b.zip |
Fix bugs related to empty lines handling.
-rwxr-xr-x | batch-stabilize.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/batch-stabilize.py b/batch-stabilize.py index 0289c42..e2c4976 100755 --- a/batch-stabilize.py +++ b/batch-stabilize.py @@ -62,7 +62,10 @@ if __name__ == "__main__": stabilization_dict = {} bug_id = -1 for line in input_file: - if line == "\n": + line = line.strip() + + # Skip empty/whitespace lines. + if not line: continue if line.startswith("#"): @@ -78,9 +81,9 @@ if __name__ == "__main__": print 'Could not recognize bug id' sys.exit(1) - if not line.endswith("\n"): - line += "\n" - cpv = line[1:-1] + # Drop the leading '='. + cpv = line[1:] + p = portage.versions.catsplit(cpv)[1] pn = portage.versions.pkgsplit(cpv)[0] ebuild_name = p + ".ebuild" |