mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-10 08:21:29 +00:00
Convert spaces to tabs.
This commit is contained in:
parent
34c6d5a238
commit
53cd9f8641
@ -36,15 +36,15 @@ control_file_found = False
|
|||||||
|
|
||||||
# Check changelog file exists.
|
# Check changelog file exists.
|
||||||
for location in valid_locations:
|
for location in valid_locations:
|
||||||
if os.path.exists(location):
|
if os.path.exists(location):
|
||||||
control_file_found = True
|
control_file_found = True
|
||||||
control_file = location
|
control_file = location
|
||||||
break # Stop looking.
|
break # Stop looking.
|
||||||
|
|
||||||
# Check if we've found a control file.
|
# Check if we've found a control file.
|
||||||
if not control_file_found:
|
if not control_file_found:
|
||||||
sys.stderr.write("Unable to find debian/control file.\n")
|
sys.stderr.write("Unable to find debian/control file.\n")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Read found file contents.
|
# Read found file contents.
|
||||||
debian_control_file = open(control_file, "r")
|
debian_control_file = open(control_file, "r")
|
||||||
@ -53,8 +53,8 @@ debian_control_file.close()
|
|||||||
|
|
||||||
# Check if there is a Maintainer field in file found.
|
# Check if there is a Maintainer field in file found.
|
||||||
if not 'Maintainer' in file_contents:
|
if not 'Maintainer' in file_contents:
|
||||||
sys.stderr.write("Unable to find Maintainer field in %s.\n" % control_file)
|
sys.stderr.write("Unable to find Maintainer field in %s.\n" % control_file)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
package_field = re.findall('(Source:) (.*)', file_contents)
|
package_field = re.findall('(Source:) (.*)', file_contents)
|
||||||
package_name = package_field[0][1]
|
package_name = package_field[0][1]
|
||||||
@ -67,26 +67,26 @@ maintainer_name = maintainer_field[0][1]
|
|||||||
maintainer_mail = maintainer_field[0][2]
|
maintainer_mail = maintainer_field[0][2]
|
||||||
|
|
||||||
if maintainer_mail.find("@ubuntu.com") != -1:
|
if maintainer_mail.find("@ubuntu.com") != -1:
|
||||||
print "Maintainer email is set to an @ubuntu.com address - doing nothing."
|
print "Maintainer email is set to an @ubuntu.com address - doing nothing."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Check if Maintainer field is as approved in TB decision.
|
# Check if Maintainer field is as approved in TB decision.
|
||||||
if 'Ubuntu Developers' in maintainer_name and \
|
if 'Ubuntu Developers' in maintainer_name and \
|
||||||
'<ubuntu-devel-discuss@lists.ubuntu.com>' in maintainer_mail:
|
'<ubuntu-devel-discuss@lists.ubuntu.com>' in maintainer_mail:
|
||||||
print "Ubuntu Developers is already set as maintainer."
|
print "Ubuntu Developers is already set as maintainer."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if not (ubuntutools.packages.checkIsInDebian(package_name, 'unstable') or ubuntutools.packages.checkIsInDebian(package_name, 'experimental')):
|
if not (ubuntutools.packages.checkIsInDebian(package_name, 'unstable') or ubuntutools.packages.checkIsInDebian(package_name, 'experimental')):
|
||||||
user_email_address = os.getenv('DEBEMAIL')
|
user_email_address = os.getenv('DEBEMAIL')
|
||||||
if not user_email_address:
|
if not user_email_address:
|
||||||
user_email_address = os.getenv('EMAIL')
|
user_email_address = os.getenv('EMAIL')
|
||||||
if not user_email_address:
|
if not user_email_address:
|
||||||
sys.stderr.write('The environment variable DEBEMAIL or EMAIL ' +\
|
sys.stderr.write('The environment variable DEBEMAIL or EMAIL ' +\
|
||||||
'needs to be set to make proper use of this script.\n')
|
'needs to be set to make proper use of this script.\n')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
target_maintainer = user_email_address
|
target_maintainer = user_email_address
|
||||||
else:
|
else:
|
||||||
target_maintainer = "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>"
|
target_maintainer = "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>"
|
||||||
|
|
||||||
# Set original maintainer field in a string.
|
# Set original maintainer field in a string.
|
||||||
original_maintainer = maintainer_name + " " + maintainer_mail
|
original_maintainer = maintainer_name + " " + maintainer_mail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user