* get-branches: Now check team option before anything else.

This commit is contained in:
Jonathan Patrick Davies 2008-08-11 23:45:07 +01:00
parent fb7bb815e0
commit eab57aec28
2 changed files with 11 additions and 9 deletions

1
debian/changelog vendored
View File

@ -16,6 +16,7 @@ ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low
* requestsync: Use the functions in the common.py file above to authenticate
with Launchpad.
* debian/control: Changed XS-Python-Version to >= 2.5.
* get-branches: Now check team option before anything else.
[ Siegfried-Angel Gevatter Pujals ]
* Add the GNU General Public License header to all scripts.

View File

@ -48,6 +48,15 @@ def main():
(options, args) = optParser.parse_args()
# Parse our options.
# No flags, and no team name specified.
if not options.lpteam and not args:
print >> sys.stderr, "No team has been specified."
optParser.print_help()
sys.exit(1)
if args:
team = args[0]
# Dictionary settings.
if options.directory:
try:
@ -71,7 +80,7 @@ def main():
# Launchpad team setting.
if options.lpteam:
try:
team = args[0]
team = args[optsParsed]
optsParsed += 1
except IndexError:
print >> sys.stderr, "The '-t' option requires an argument."
@ -97,14 +106,6 @@ def main():
else:
operation_type = "branch"
# No flags, and no team name specified.
if not options.lpteam and not args:
print >> sys.stderr, "No team has been specified."
optParser.print_help()
sys.exit(1)
elif args:
team = args[optsParsed]
pwd = os.getcwd()
os.chdir(directory)