diff --git a/ubuntutools/config.py b/ubuntutools/config.py index d0e2409..1235e59 100644 --- a/ubuntutools/config.py +++ b/ubuntutools/config.py @@ -98,9 +98,12 @@ class UDTConfig(object): else: continue if k in compat_keys: + r_prefix = self.prefix + if key in self.defaults: + r_prefix = 'UBUNTUTOOLS' print >> stderr, ( 'W: Deprecated configuration variable: %s. ' - 'Replaced by %s.') % (k, key) + 'Replaced by %s_%s.') % (k, r_prefix, key) return value return default diff --git a/ubuntutools/test/test_config.py b/ubuntutools/test/test_config.py index 992edd4..8606830 100644 --- a/ubuntutools/test/test_config.py +++ b/ubuntutools/test/test_config.py @@ -128,7 +128,8 @@ REPEAT=yes errs = ubuntutools.config.stderr.getvalue().strip() ubuntutools.config.stderr = StringIO() self.assertEqual(len(errs.splitlines()), 1) - self.assertRegexpMatches(errs, r'Deprecated.*\bCOMPATFOOBAR\b.*\bQUX\b') + self.assertRegexpMatches(errs, + r'Deprecated.*\bCOMPATFOOBAR\b.*\bTEST_QUX\b') def test_boolean(self): config_files['user'] = "TEST_BOOLEAN=yes"