Create output folder if doesn't exist

This commit is contained in:
Ranjhith Kalisamy 2011-10-24 00:30:58 +05:30
commit 3192cf6e37

View file

@ -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)