From 8005f4751740ce143d33d5319d252698a03b08c7 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Sun, 3 Nov 2024 12:59:42 -0500 Subject: [PATCH] more linting --- social.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/social.py b/social.py index 72857a0..4776f7b 100644 --- a/social.py +++ b/social.py @@ -2219,21 +2219,19 @@ def post_to_wordpress2(title,content,headers,date,rating,address,picslist,local_ database_update_row(title,"wpurl",post_link,"forceall",local_outputs) except AttributeError as error : print (f' Error: {error}') - else: - - if post_id: - print (' Post already existed: Post ID : ',post_id) - print (' Found post for : '+title) - if env.force_web_create: - create_wordpress_post(newdate2,picchop,title,address,headers,post_id,linkslist,\ - local_outputs,content,googleadress,rating,featured_photo_id) - #update_wordpress() - else: - print (' Found existing post but skipping updating post') - else: + elif post_id: + print (' Post already existed: Post ID : ',post_id) + print (' Found post for : '+title) + if env.force_web_create: create_wordpress_post(newdate2,picchop,title,address,headers,post_id,linkslist,\ local_outputs,content,googleadress,rating,featured_photo_id) - print (' Creating wordpress post from scratch for: '+title) + #update_wordpress() + else: + print (' Found existing post but skipping updating post') + else: + create_wordpress_post(newdate2,picchop,title,address,headers,post_id,linkslist,\ + local_outputs,content,googleadress,rating,featured_photo_id) + print (' Creating wordpress post from scratch for: '+title) return True ##################################################################################################