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")
|
print("Existing record not found")
|
||||||
post_id = None
|
post_id = None
|
||||||
map_media_post_id = None
|
map_media_post_id = None
|
||||||
|
neighborhood = None
|
||||||
|
city = None
|
||||||
if not event_class["is_postable"]:
|
if not event_class["is_postable"]:
|
||||||
print(
|
print(
|
||||||
"Outage is {} considered postable, will not post".format(
|
"Outage is {} considered postable, will not post".format(
|
||||||
|
@ -438,13 +440,11 @@ with Session(engine) as session:
|
||||||
post_id = initial_post_result["post_id"]
|
post_id = initial_post_result["post_id"]
|
||||||
map_media_post_id = initial_post_result["map_media_post_id"]
|
map_media_post_id = initial_post_result["map_media_post_id"]
|
||||||
|
|
||||||
neighborhood = str()
|
|
||||||
try:
|
try:
|
||||||
neighborhood = initial_post_result["neighborhood"]
|
neighborhood = initial_post_result["neighborhood"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
city = str()
|
|
||||||
try:
|
try:
|
||||||
city = initial_post_result["city"]
|
city = initial_post_result["city"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in a new issue