Send to device: Use default save template when driver specific one is empty or unspecified

This commit is contained in:
Kovid Goyal 2010-01-07 16:46:48 -07:00
commit 425cc3befc
2 changed files with 9 additions and 1 deletions

View File

@ -805,7 +805,7 @@ class Device(DeviceConfig, DevicePlugin):
break
settings = self.settings()
template = settings.save_template
template = self.save_template()
use_subdirs = self.SUPPORTS_SUB_DIRS and settings.use_subdirs
fname = sanitize(fname)

View File

@ -70,6 +70,14 @@ class DeviceConfig(object):
def settings(cls):
return cls._config().parse()
@classmethod
def save_template(cls):
st = cls.settings().save_template
if st:
return st
else:
return cls._default_save_template()
@classmethod
def customization_help(cls, gui=False):
return cls.HELP_MESSAGE