forked from gentoo-utils/gentoo-utils
15 lines
306 B
Python
Executable File
15 lines
306 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import portage
|
|
|
|
for line in sys.stdin.buffer:
|
|
a, b = line.decode().split(" ")
|
|
|
|
try:
|
|
sys.stdout.buffer.write(f"{portage.vercmp(a, b)}\n".encode())
|
|
except:
|
|
sys.stdout.buffer.write(b"err\n")
|
|
finally:
|
|
sys.stdout.buffer.flush()
|