File: __main__.py

package info (click to toggle)
python-pretty-yaml 25.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: python: 1,100; makefile: 3
file content (9 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
import os, sys, pyaml.cli

main = pyaml.cli.main # was defined here before moving to cli.py

if __name__ == '__main__':
	try: sys.exit(main())
	except BrokenPipeError: # stdout pipe closed
		os.dup2(os.open(os.devnull, os.O_WRONLY), sys.stdout.fileno())
		sys.exit(1)