Introduce CustomConfig method that applies set of transforms
It is a bit cleaner than making chains of calls like
{{{
value = os.path.expanduser(value)
value = os.path.abspath(value)
}}}
since we do see all transformations to be applied in a single
iterable and have no repeated code like in the above example.
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
@@ -61,7 +61,8 @@ class MaildirRepository(BaseRepository):
|
||||
os.utime(cur_dir, (cur_atime, os.path.getmtime(cur_dir)))
|
||||
|
||||
def getlocalroot(self):
|
||||
return os.path.expanduser(self.getconf('localfolders'))
|
||||
xforms = [os.path.expanduser]
|
||||
return self.getconf_xform('localfolders', xforms)
|
||||
|
||||
def debug(self, msg):
|
||||
self.ui.debug('maildir', msg)
|
||||
|
||||
Reference in New Issue
Block a user