Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/guid.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/guid.py')
-rw-r--r--src/guid.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/guid.py b/src/guid.py
index d163137..30905f9 100644
--- a/src/guid.py
+++ b/src/guid.py
@@ -8,9 +8,14 @@ class Guid:
"Constructor, init reference count"
self.count=0
- def newid(self):
+ def newid(self, start=None):
"Generate a new id"
- self.count = self.count+1
+ if start is None:
+ self.count = self.count+1
+ else:
+ if self.count < start:
+ self.count = start
+ return start
return self.count
__instance=None