~ursinha/arsenal/2.0-with-people-and-subscribed-packages

« back to all changes in this revision

Viewing changes to lpltk/bug_activity.py

  • Committer: Bryce Harrington
  • Date: 2011-05-26 22:15:38 UTC
  • Revision ID: bryce@canonical.com-20110526221538-j03815v19t3f1dfh
Add type checking for Launchpad objects

This will help catch problems such as accidentally passing a lpltk object
rather than a lp object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
3
from person                   import Person
4
 
from utils                    import o2str
 
4
from utils                    import (
 
5
    o2str,
 
6
    typecheck_Entry
 
7
    )
5
8
 
6
9
class Activity(object):
7
10
    # __init__
49
52
    def __init__(self, service, bug, lp_bug_activity):
50
53
        self.__service           = service
51
54
        self.__bug               = bug
52
 
        self.__lp_bug_activity   = lp_bug_activity
 
55
        self.__lp_bug_activity   = typecheck_Entry(lp_bug_activity)
53
56
        self.__date_changed      = None
54
57
        self.__person            = None
55
58
        self.__old_value         = None