basename() script name for prefix

This commit is contained in:
Stefano Rivera 2010-12-20 00:27:21 +02:00
parent 1bb418e02f
commit 4e827697e8

View File

@ -56,7 +56,7 @@ def get_value(key, default=None, prefix=None, compat_vars=[]):
prefix is applied to them.
"""
if prefix is None:
prefix = sys.argv[0].upper().replace('-', '_') + '_'
prefix = os.path.basename(sys.argv[0]).upper().replace('-', '_') + '_'
config = get_devscripts_config()
for k in (prefix + key, 'UBUNTUTOOLS_' + key):