Do not add extension to confname when user-defined
If the user chose the confname, we should generate an error rather than silently change it when we find it's already taken.master
parent
e6c4dcbdbc
commit
41226d0489
|
@ -109,6 +109,14 @@ def run(args, persoconf, logger):
|
||||||
# Check the conf file name
|
# Check the conf file name
|
||||||
if ( confname == persoconf.metafile
|
if ( confname == persoconf.metafile
|
||||||
or confname in appmeta.files ):
|
or confname in appmeta.files ):
|
||||||
|
|
||||||
|
# If the confanme was user-defined, it's a serious error.
|
||||||
|
if args.confname:
|
||||||
|
logger.error( "Confname '%s' is already taken: try another one"
|
||||||
|
% confname )
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
# Otherwise it's cool, we just have to change the confname by ourselves
|
||||||
logger.info( "Confname '%s' is already taken: trying another one"
|
logger.info( "Confname '%s' is already taken: trying another one"
|
||||||
% confname )
|
% confname )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue