14 lines
296 B
Python
14 lines
296 B
Python
import os
|
|||
|
|
import sys
|
||
|
|
|
||
|
|
from .cli import main
|
||
|
|
|
||
|
|
try:
|
||
|
|
sys.exit(main())
|
||
|
|
except KeyboardInterrupt:
|
||
|
|
sys.exit(130)
|
||
|
|
except BrokenPipeError:
|
||
|
|
# Uscita normale quando l'output finisce in una pipe chiusa (| head).
|
||
|
|
os.dup2(os.open(os.devnull, os.O_WRONLY), sys.stdout.fileno())
|
||
|
|
sys.exit(0)
|