This commit is contained in:
Ville Rantanen
2016-10-25 10:52:40 +03:00
parent 8846323b9f
commit 5357aafa34

View File

@@ -36,11 +36,18 @@ def setup_options():
if options.clearAll: if options.clearAll:
options.clear=True options.clear=True
if options.SRC!='': if options.SRC!='':
options.SRC=os.path.abspath(options.SRC) options.SRC=path_to_abs(options.SRC)
if options.TGT!='': if options.TGT!='':
options.TGT=os.path.abspath(options.TGT) options.TGT=path_to_abs(options.TGT)
return options return options
def path_to_abs(path):
append=""
if path.endswith("/"):
append="/"
return os.path.abspath(path)+append
def createdb(fname): def createdb(fname):
conn=sqlite3.connect(fname) conn=sqlite3.connect(fname)
db=conn.cursor() db=conn.cursor()