mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 15:53:07 +02:00
ShortUUID: Raise valueError if ShortUUID is initialized with incorrect type
This commit is contained in:
parent
45f547ae7c
commit
e09035d79c
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,9 @@ class ShortUUID(object):
|
||||||
self.value = str(value)[:8]
|
self.value = str(value)[:8]
|
||||||
elif type(value) is ShortUUID:
|
elif type(value) is ShortUUID:
|
||||||
self.value = value.value
|
self.value = value.value
|
||||||
|
else:
|
||||||
|
raise ValueError("Incorrect type for ShortUUID: {0}"
|
||||||
|
.format(type(value)))
|
||||||
|
|
||||||
self.tw = tw
|
self.tw = tw
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue