ikiwiki: Don't error out when listing before setup

- After a ikiwiki module is installed but not yet enabled, visting the
  'manage' page throws an error.  Fix this.
This commit is contained in:
Sunil Mohan Adapa 2015-04-18 21:07:08 +05:30
parent 9b674292c8
commit cc97304925

View File

@ -100,8 +100,11 @@ def subcommand_disable(_):
def subcommand_get_sites(_):
"""Get wikis and blogs."""
sites = os.listdir(SITE_PATH)
print('\n'.join(sites))
try:
sites = os.listdir(SITE_PATH)
print('\n'.join(sites))
except FileNotFoundError:
pass
def subcommand_create_wiki(arguments):