projects
/
pygdb.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
104bb12
)
Do not add multiple config entries
author
Stefan Huber <shuber2@gmail.com>
Mon, 9 Jun 2008 19:48:52 +0000
(21:48 +0200)
committer
Stefan Huber <shuber2@gmail.com>
Mon, 9 Jun 2008 19:48:52 +0000
(21:48 +0200)
Configuration.py
patch
|
blob
|
history
diff --git
a/Configuration.py
b/Configuration.py
index a8b4abfa8b768b5276bb932c18923285348339ae..e3ee6647950b74d6b7efd58166ecf6f0fcca7889 100755
(executable)
--- a/
Configuration.py
+++ b/
Configuration.py
@@
-108,14
+108,20
@@
class Configuration:
f.write("watch %(expr)s\n" % w)
f.write("watch %(expr)s\n" % w)
- def addBreak(self, file, lineno, cond=None):
- self.breakpoints += [ {"file" : file, "lineno" : lineno, "cond" : cond} ]
+ def addBreak(self, file, lineno, cond=None):
+ bp = {"file" : file, "lineno" : lineno, "cond" : cond}
+ if not bp in self.breakpoints:
+ self.breakpoints += [bp]
def addInt(self, name, val):
def addInt(self, name, val):
- self.ints += [{"name": name, "val": val}]
+ i = {"name": name, "val": val}
+ if not i in self.ints:
+ self.ints += [i]
def addWatch(self, expr):
def addWatch(self, expr):
- self.watches += [ {"expr" : expr.strip() } ]
+ w = {"expr" : expr.strip() }
+ if not w in self.watches:
+ self.watches += [w]
def findInt(self, name):
def findInt(self, name):