mirror of https://github.com/garabik/grc.git
python2 compatibility if command not found or permission denied
This commit is contained in:
parent
5da88f5bcc
commit
987fb4ce98
16
grc
16
grc
|
@ -4,13 +4,25 @@ from __future__ import print_function
|
|||
|
||||
import os, re, string, sys, getopt, signal
|
||||
|
||||
# python 2/3 compatibility
|
||||
|
||||
try:
|
||||
FileNotFoundError
|
||||
except NameError:
|
||||
FileNotFoundError = OSError
|
||||
|
||||
try:
|
||||
PermissionError
|
||||
except NameError:
|
||||
PermissionError = OSError
|
||||
|
||||
|
||||
def version():
|
||||
print ("Generic Colouriser 1.11")
|
||||
print ("Generic Colouriser 1.11.1rc")
|
||||
sys.exit()
|
||||
|
||||
def help():
|
||||
print("""Generic Colouriser 1.11
|
||||
print("""Generic Colouriser 1.11.1rc
|
||||
grc [options] command [args]
|
||||
Options:
|
||||
-e --stderr redirect stderr. If this option is selected,
|
||||
|
|
Loading…
Reference in New Issue