add the ability to create a new deck conf from existing one

This commit is contained in:
Damien Elmes 2011-12-10 00:47:04 +09:00
parent 20ffbd57a7
commit 46443762c0

View file

@ -193,9 +193,9 @@ class DeckManager(object):
self.dconf[str(g['id'])] = g
self.save()
def confId(self, name):
def confId(self, name, cloneFrom=defaultConf):
"Create a new configuration and return id."
c = copy.deepcopy(defaultConf)
c = copy.deepcopy(cloneFrom)
while 1:
id = intTime(1000)
if str(id) not in self.dconf: