fix: put mkdir in else clause for init

This commit is contained in:
Jeffrey Serio 2023-09-16 15:05:28 -05:00
parent ef29e741f9
commit eec1bc7211

View File

@ -37,12 +37,12 @@ class FandomWiki:
console.print("(2) You typed the name of the wiki incorrectly.") console.print("(2) You typed the name of the wiki incorrectly.")
console.print("(3) The server hosting that wiki is down for some reason.\n") console.print("(3) The server hosting that wiki is down for some reason.\n")
console.print(f"HTTP error: {http_err}") console.print(f"HTTP error: {http_err}")
else:
if not self.site_dir.exists():
self.site_dir.mkdir()
if not self.site_dir.exists(): if not self.images_dir.exists():
self.site_dir.mkdir() self.images_dir.mkdir()
if not self.images_dir.exists():
self.images_dir.mkdir()
def get_hop0_urls(self) -> list: def get_hop0_urls(self) -> list:
starting_url = f"{self.canonical_url}/wiki/Local_Sitemap" starting_url = f"{self.canonical_url}/wiki/Local_Sitemap"