Commit 185e9694 authored by Yann Leboulanger's avatar Yann Leboulanger

add -c option to history_manager. Fixes #5058

parent ac5bc7e9
......@@ -53,9 +53,34 @@
import time
import locale
import getopt
from common import i18n
def parseOpts():
config_path = None
try:
shortargs = 'hc:'
longargs = 'help config_path='
opts = getopt.getopt(sys.argv[1:], shortargs, longargs.split())[0]
except getopt.error, msg:
print str(msg)
print 'for help use --help'
sys.exit(2)
for o, a in opts:
if o in ('-h', '--help'):
print 'history_manager [--help] [--config-path]'
sys.exit()
elif o in ('-c', '--config-path'):
config_path = a
return config_path
config_path = parseOpts()
del parseOpts
import common.configpaths
common.configpaths.gajimpaths.init()
common.configpaths.gajimpaths.init(config_path)
del config_path
common.configpaths.gajimpaths.init_profile()
from common import exceptions
import dialogs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment