mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
Allow for the EMAIL env var as a fallback for DEBEMAIL.
This commit is contained in:
parent
6799633ca3
commit
1820a2ccfa
@ -203,8 +203,11 @@ def get_email_address():
|
||||
'''Get the DEBEMAIL environment variable or give an error.'''
|
||||
myemailaddr = os.getenv('DEBEMAIL')
|
||||
if not myemailaddr:
|
||||
print >> sys.stderr, 'The environment variable DEBEMAIL needs to be ' +\
|
||||
' set to make use of this script, unless you use option --lp.'
|
||||
myemailaddr = os.getenv('EMAIL')
|
||||
if not myemailaddr:
|
||||
print >> sys.stderr, 'The environment variable DEBEMAIL or ' +\
|
||||
'EMAIL needs to be set to make use of this script, unless ' +\
|
||||
'you use option --lp.'
|
||||
return myemailaddr
|
||||
|
||||
def mail_bug(source_package, subscribe, status, bugtitle, bugtext, keyid = None):
|
||||
|
@ -79,9 +79,11 @@ if 'Ubuntu Developers' in maintainer_name and \
|
||||
if not ubuntutools.packages.checkIsInDebian(package_name, 'unstable'):
|
||||
user_email_address = os.getenv('DEBEMAIL')
|
||||
if not user_email_address:
|
||||
sys.stderr.write('The environment variable DEBEMAIL needs to be ' +\
|
||||
'set to make proper use of this script.\n')
|
||||
sys.exit(1)
|
||||
user_email_address = os.getenv('EMAIL')
|
||||
if not user_email_address:
|
||||
sys.stderr.write('The environment variable DEBEMAIL or EMAIL ' +\
|
||||
'needs to be set to make proper use of this script.\n')
|
||||
sys.exit(1)
|
||||
target_maintainer = user_email_address
|
||||
else:
|
||||
target_maintainer = "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user