newfol/newfol
brian m. carlson 0f11e5118d
Avoid print() with keyword arguments.
This syntax isn't compatible with Python 2, so some syntax checking
tools complain.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
2014-07-20 00:04:25 +00:00

23 lines
631 B
Python
Executable file

#! /usr/bin/python3
import sys
sys.path.insert(0, sys.path[0] + "/lib")
import locale
import newfol.exception
import newfol.main
if __name__ == '__main__':
try:
locale.setlocale(locale.LC_ALL, '')
newfol.main.main(sys.argv[1:])
except newfol.exception.NewfolError as e:
sys.stderr.write("E: {0}\n".format(str(e)))
sys.exit(2)
except newfol.exception.UpgradeNeededError as e:
sys.stderr.write("E: {0}; try upgrading\n".format(str(e)))
sys.exit(2)
except newfol.exception.FilemanipError as e:
sys.stderr.write("E: {0}\n".format(str(e)))
sys.exit(2)