HTD

Merge lp:~simon-d-bull/htd/3.1.fix-1036385 into lp:htd/3.1

Proposed by Simon Bull
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 12
Merged at revision: 12
Proposed branch: lp:~simon-d-bull/htd/3.1.fix-1036385
Merge into: lp:htd/3.1
Diff against target: 21 lines (+4/-4)
1 file modified
htd31/_objects/attribute.py (+4/-4)
To merge this branch: bzr merge lp:~simon-d-bull/htd/3.1.fix-1036385
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Review via email: mp+119782@code.launchpad.net

Description of the change

Switched type check and validation.

To post a comment you must log in.
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Thanks Simon :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'htd31/_objects/attribute.py'
2--- htd31/_objects/attribute.py 2012-08-13 20:06:11 +0000
3+++ htd31/_objects/attribute.py 2012-08-15 20:13:25 +0000
4@@ -99,13 +99,13 @@
5 if name is None:
6 self._name = None
7 return
8-
9+
10+ if isinstance(name, str) is False:
11+ raise ValueError("Attribute name must be str type.")
12+
13 if "." in name:
14 raise ValueError("Attribute name must not contain '.'")
15
16- if isinstance(name, str) is False:
17- raise ValueError("Attribute name must be str type.")
18-
19 self._name = name
20
21 @property

Subscribers

People subscribed via source and target branches

to all changes: