Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf9bc436 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

roomservice: Handle missing netrc file

Change-Id: If981fe79dc3e2191434301239b0cd585be8b4730
parent d501e605
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -12,12 +12,15 @@ print "Device %s not found. Attempting to retrieve device repository from Cyanog

repositories = []

try:
    authtuple = netrc.netrc().authenticators("api.github.com")

    if authtuple:
        githubauth = base64.encodestring('%s:%s' % (authtuple[0], authtuple[2])).replace('\n', '')
    else:
        githubauth = None
except:
    githubauth = None

page = 1
while True: