* get-branches: Open the teams code page before making a new directory.

This commit is contained in:
Jonathan Patrick Davies 2008-08-11 07:38:59 +01:00
parent f928a041be
commit dc80eacf3f
2 changed files with 11 additions and 10 deletions

3
debian/changelog vendored
View File

@ -1,6 +1,7 @@
ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low
* Changes go here. [ Jonathan Patrick Davies ]
* get-branches: Open the teams code page before making a new directory.
-- Jonathan Patrick Davies <jpds@ubuntu.com> Sun, 10 August 2008 22:07:58 +0100 -- Jonathan Patrick Davies <jpds@ubuntu.com> Sun, 10 August 2008 22:07:58 +0100

View File

@ -107,21 +107,21 @@ def main():
pwd = os.getcwd() pwd = os.getcwd()
os.chdir(directory) os.chdir(directory)
# Try to open the teams code page.
try:
sock = urllib2.urlopen("https://code.launchpad.net/~%s" % team)
except urllib2.HTTPError:
print >> sys.stderr, "The page https://code.launchpad.net/~%s does " \
"not exist." % team
print >> sys.stderr, "Perhaps invalid team name?"
sys.exit(1)
try: try:
os.makedirs(team) os.makedirs(team)
except: except:
pass pass
os.chdir(team) os.chdir(team)
# Try to open the teams code page.
try:
sock = urllib2.urlopen("https://code.launchpad.net/~%s" % team)
except urllib2.HTTPError:
print >> sys.stderr, "The page http://code.launchpad.net/~%s does " \
"not exist." % team
print >> sys.stderr, "Perhaps invalid team name?"
sys.exit(1)
branch_list_page = sock.read() branch_list_page = sock.read()
sock.close() sock.close()