Fix variable referenced before assignment error
This commit is contained in:
parent
7c805cd7b2
commit
3feb7e7f7f
|
@ -51,14 +51,14 @@ def get_profile_id(service):
|
||||||
if acc.get('name') == accountName:
|
if acc.get('name') == accountName:
|
||||||
accountId = acc.get('id')
|
accountId = acc.get('id')
|
||||||
|
|
||||||
# TODO: check, whether next line is doing something useful.
|
# TODO: check, whether next line is doing something useful.
|
||||||
webproperties = service.management().webproperties().list(
|
webproperties = service.management().webproperties().list(
|
||||||
accountId=accountId).execute()
|
accountId=accountId).execute()
|
||||||
|
|
||||||
profiles = service.management().profiles().list(
|
profiles = service.management().profiles().list(
|
||||||
accountId=accountId, webPropertyId=webPropertyId).execute()
|
accountId=accountId, webPropertyId=webPropertyId).execute()
|
||||||
|
|
||||||
if profiles.get('items'):
|
if profiles.get('items'):
|
||||||
return profiles.get('items')[0].get('id')
|
return profiles.get('items')[0].get('id')
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue