def import_scc(self, filename):
"""
Imports simple, single-file scc-profile.
Just loads it, checks for shell() actions and asks user to enter name.
"""
files = self.builder.get_object("lstImportPackage")
# Load profile
profile = Profile(GuiActionParser())
try:
profile.load(filename)
except Exception, e:
# Profile cannot be parsed. Display error message and let user to quit
# Error message reuses page from VDF import, because they are
# basically the same
log.error(e)
self.error(str(e))
return
name = ".".join(os.path.split(filename)[-1].split(".")[0:-1])
files.clear()
o = GObject.GObject()
o.obj = profile
files.append(( 2, name, name, _("(profile)"), o ))
self.check_shell_commands()
评论列表
文章目录