Move declarations to the right spot
This commit is contained in:
parent
1aa5ea0975
commit
5075e73494
1 changed files with 2 additions and 2 deletions
4
scl.py
4
scl.py
|
@ -421,6 +421,8 @@ with Session(engine) as session:
|
|||
print("Existing record not found")
|
||||
post_id = None
|
||||
map_media_post_id = None
|
||||
neighborhood = None
|
||||
city = None
|
||||
if not event_class["is_postable"]:
|
||||
print(
|
||||
"Outage is {} considered postable, will not post".format(
|
||||
|
@ -438,13 +440,11 @@ with Session(engine) as session:
|
|||
post_id = initial_post_result["post_id"]
|
||||
map_media_post_id = initial_post_result["map_media_post_id"]
|
||||
|
||||
neighborhood = str()
|
||||
try:
|
||||
neighborhood = initial_post_result["neighborhood"]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
city = str()
|
||||
try:
|
||||
city = initial_post_result["city"]
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in a new issue