writeconfig exits after writing

This commit is contained in:
ville rantanen
2014-08-14 20:47:15 +03:00
parent 1891ef0673
commit c90b8f53c4

View File

@@ -27,7 +27,7 @@ from datetime import datetime
# (c) ville.rantanen@helsinki.fi # (c) ville.rantanen@helsinki.fi
__version__='2.20140630' __version__='2.20140814'
FILECONFIG=".config" FILECONFIG=".config"
FILEDESC="descriptions.csv" FILEDESC="descriptions.csv"
@@ -493,7 +493,7 @@ def setupoptions():
parser.add_argument("--version",action='version', version=__version__) parser.add_argument("--version",action='version', version=__version__)
parser.add_argument("-c",action="store_true",dest="writeconfig",default=False, parser.add_argument("-c",action="store_true",dest="writeconfig",default=False,
help="Write current configuration to file "+FILECONFIG+ help="Write current configuration to file "+FILECONFIG+
". If file exists, Qalbum and thumbnail handling read from the file, "+ " and exit. If file exists, settings read from the file, "+
"overriding switches.") "overriding switches.")
parser.add_argument("-r",action="store_true",dest="reverse",default=False, parser.add_argument("-r",action="store_true",dest="reverse",default=False,
help="Reverse sort orded") help="Reverse sort orded")
@@ -594,6 +594,7 @@ def execute_plain():
options=setupdefaultoptions(options) options=setupdefaultoptions(options)
if options.writeconfig: if options.writeconfig:
writeconfig(options) writeconfig(options)
sys.exit(0)
# Copy all resources to target folder # Copy all resources to target folder
pathname=os.path.dirname(os.path.realpath(sys.argv[0])) pathname=os.path.dirname(os.path.realpath(sys.argv[0]))
fullpath=os.path.abspath(pathname) fullpath=os.path.abspath(pathname)