mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Create output folder if doesn't exist
This commit is contained in:
parent
2d5dd70e85
commit
3192cf6e37
1 changed files with 8 additions and 0 deletions
|
|
@ -271,4 +271,12 @@ if __name__ == '__main__':
|
|||
else:
|
||||
print "you must provide either --wpfile, --dotclear or --feed options"
|
||||
exit()
|
||||
|
||||
if not os.path.exists(args.output):
|
||||
try:
|
||||
os.mkdir(args.output)
|
||||
except OSError:
|
||||
error("Couldn't create the output folder: " + args.output)
|
||||
exit()
|
||||
|
||||
main(input_type, args.input, args.markup, args.output, dircat=args.dircat)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue