~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-09 18:02:00 UTC
  • mfrom: (1963.2.7 bzr.dev.no_has_key)
  • Revision ID: pqm@pqm.ubuntu.com-20060909180200-96e41112dff213f3
(robey) remove hasattr and == None in favor of getattr() and is None

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
 
39
39
def _get_filename(f):
40
 
    if hasattr(f, 'name'):
41
 
        return f.name
42
 
    return '<unknown>'
 
40
    return getattr(f, 'name', '<unknown>')
43
41
 
44
42
 
45
43
def read_bundle(f):
151
149
    
152
150
    # This has to be formatted for "original" date, so that the
153
151
    # revision XML entry will be reproduced faithfully.
154
 
    if offset == None:
 
152
    if offset is None:
155
153
        offset = 0
156
154
    tt = time.gmtime(t + offset)
157
155