From 1cfe684420be269afbd0c2a9b1978b2595a1a085 Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Sat, 20 Feb 2010 18:36:12 +0100 Subject: [PATCH] requestsync: * Add an error message when Ubuntu has a newer version than Debian. --- requestsync | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/requestsync b/requestsync index bc276f7..c1dc074 100755 --- a/requestsync +++ b/requestsync @@ -78,7 +78,7 @@ if __name__ == '__main__': # import the needed requestsync module if options.lpapi: from ubuntutools.requestsync.lp import * - from ubuntutools.lp.lpapicache import Distribution, PersonTeam + from ubuntutools.lp.lpapicache import Distribution # See if we have LP credentials and exit if we don't - cannot continue in this case try: Launchpad.login() @@ -140,11 +140,15 @@ if __name__ == '__main__': print >> sys.stderr, "E: %s" % e sys.exit(1) - # Debian and Ubuntu versions are the same - stop + # Stop if Ubuntu has already the version from Debian or a newer version if ubuntu_version == debian_version: print >> sys.stderr, \ 'E: The versions in Debian and Ubuntu are the same already (%s). Aborting.' % ubuntu_version sys.exit(1) + if ubuntu_version > debian_version: + print >> sys.stderr, \ + 'E: The version in Ubuntu (%s) is newer than the version in Debian (%s). Aborting.' % (ubuntu_version, debian_version) + sys.exit(1) # -s flag not specified - check if we do need sponsorship if not sponsorship: