diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-10-21 19:46:33 +0100 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-10-21 19:46:33 +0100 |
commit | 07b89fe2ff0b1c7f1ce2d25a8918612470a71725 (patch) | |
tree | d27dcc715de6a16be637c03be3f051a37b68d100 /tools | |
parent | 5882505f3690dcad87c142c7c57cd684366885be (diff) | |
download | build-07b89fe2ff0b1c7f1ce2d25a8918612470a71725.zip build-07b89fe2ff0b1c7f1ce2d25a8918612470a71725.tar.gz build-07b89fe2ff0b1c7f1ce2d25a8918612470a71725.tar.bz2 |
roomservice: Handle missing netrc file
Change-Id: If981fe79dc3e2191434301239b0cd585be8b4730
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/roomservice.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/roomservice.py b/tools/roomservice.py index c1979ef..bc3a809 100755 --- a/tools/roomservice.py +++ b/tools/roomservice.py @@ -38,11 +38,14 @@ if not depsonly: repositories = [] -authtuple = netrc.netrc().authenticators("api.github.com") +try: + authtuple = netrc.netrc().authenticators("api.github.com") -if authtuple: - githubauth = base64.encodestring('%s:%s' % (authtuple[0], authtuple[2])).replace('\n', '') -else: + if authtuple: + githubauth = base64.encodestring('%s:%s' % (authtuple[0], authtuple[2])).replace('\n', '') + else: + githubauth = None +except: githubauth = None page = 1 |