This syntax isn't compatible with Python 2, so some syntax checking tools complain. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
23 lines
631 B
Python
Executable file
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)
|