Skip to content
Browse files

made python output prettier

  • Loading branch information...
1 parent 8b03e4b commit dd95c4ad8914d2b5808c3bf187e52fc02f85edc8 @ptarjan committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 main.py
View
3 main.py
@@ -19,6 +19,7 @@
import yaml
import simplejson
+import pprint
import wsgiref.handlers
from django_jsonencoder import DjangoJSONEncoder
@@ -35,7 +36,7 @@ def getOutput(y, type) :
try :
objects = yaml.load(y)
if type == "python" :
- return str(objects)
+ return pprint.pformat(objects)
elif type == "canonical_yaml" :
return yaml.dump(objects, canonical=True)
else : # type == "json"

0 comments on commit dd95c4a

Please sign in to comment.
Something went wrong with that request. Please try again.