requestsync:

* Add an error message when Ubuntu has a newer version than Debian.
This commit is contained in:
Michael Bienia 2010-02-20 18:36:12 +01:00
parent 8377c6bfa3
commit 1cfe684420

View File

@ -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: