Mercurial > code > home > repos > light9
diff bin/curvecalc @ 230:b7095e4a6c43
curvecalc fixes: curve paths, empty function strings
author | drewp@bigasterisk.com |
---|---|
date | Sun, 05 Jun 2005 07:04:34 +0000 |
parents | c5a79314afdf |
children | 63601fe0c3b0 |
line wrap: on
line diff
--- a/bin/curvecalc Sun Jun 05 07:03:32 2005 +0000 +++ b/bin/curvecalc Sun Jun 05 07:04:34 2005 +0000 @@ -250,7 +250,11 @@ subterms = [] subterm_adder(root, curveset, subterms, root, ssv).pack(side='top',fill='x') for line in file(showconfig.subtermsForSong(song)): - subname,expr = line.strip().split(" ",1) + try: + subname,expr = line.strip().split(" ",1) + except ValueError: + subname = line.strip() + expr = "" term = add_one_subterm(subname, curveset, subterms, root, ssv, expr) @@ -262,7 +266,7 @@ def savekey(*args): print "saving",song savesubterms(showconfig.subtermsForSong(song),subterms) - curveset.save(basename="curves/"+song) + curveset.save(basename=os.path.join(showconfig.curvesDir(),song)) print "saved" @@ -283,7 +287,7 @@ d.addErrback(updateerr) def updateerr(e): global later - print "err",e + print "Update error",e if later and not later.cancelled and not later.called: later.cancel() later = reactor.callLater(1,update) def update2(t):