chiark
/
gitweb
/
~mdw
/
xyla
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db2520d
)
soak (Level.__init__): Trim newline from the tree listing.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 6 Sep 2024 19:49:45 +0000
(20:49 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 6 Sep 2024 19:49:45 +0000
(20:49 +0100)
Otherwise the dump file ends up being wrong. Might as well strip other
whitespace while we're at it.
soak
patch
|
blob
|
blame
|
history
diff --git
a/soak
b/soak
index a00358e7a2f616a93daa8344eccf8d298a9906f8..79d4b61888278f3b1004aa62744d904770b3c8f7 100755
(executable)
--- a/
soak
+++ b/
soak
@@
-133,7
+133,8
@@
class Options (object):
class Level (object):
def __init__(me, kind, base, limit, tree = "_"):
me.coll = Collection(map(int, RX.findall(r"\d+", tree)))
- me.kind, me.base, me.limit, me.tree = kind, int(base), int(limit), tree
+ me.kind, me.base, me.limit, me.tree = \
+ kind, int(base), int(limit), tree.strip()
me.rlim = int(M.sqrt(me.limit - me.base))
def write(me, file):
file.write("%s %d %d %s\n" % (me.kind, me.base, me.limit, me.tree))