p140 - added CLI option to fpdb.py to control redirection of stderr
This commit is contained in:
parent
93b6f9ddaa
commit
c739395189
|
@ -17,10 +17,18 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
|
||||
print "Note: error output is being diverted to fpdb-error-log.txt and HUD-error.txt. Any major error will be reported there _only_."
|
||||
errorFile = open('fpdb-error-log.txt', 'w', 0)
|
||||
sys.stderr = errorFile
|
||||
|
||||
parser = OptionParser()
|
||||
parser.add_option("-x", "--errorsToConsole", action="store_true",
|
||||
help="If passed error output will go to the console rather than .")
|
||||
(options, sys.argv) = parser.parse_args()
|
||||
|
||||
if not options.errorsToConsole:
|
||||
print "Note: error output is being diverted to fpdb-error-log.txt and HUD-error.txt. Any major error will be reported there _only_."
|
||||
errorFile = open('fpdb-error-log.txt', 'w', 0)
|
||||
sys.stderr = errorFile
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
|
|
|
@ -292,4 +292,4 @@ class Importer:
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "CLI for fpdb_import is currently on vacation please check in later"
|
||||
print "CLI for fpdb_import is now available as CliFpdb.py"
|
||||
|
|
Loading…
Reference in New Issue
Block a user