/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_source.py

  • Committer: Mark Hammond
  • Date: 2008-08-11 02:04:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3620.
  • Revision ID: mhammond@skippinet.com.au-20080811020400-7mnjrjl02b5w9uzf
prefer getattr() over hasattr()

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
    def source_file_name(self, package):
57
57
        """Return the path of the .py file for package."""
58
 
        if hasattr(sys, "frozen"):
 
58
        if getattr(sys, "frozen", None) is not None:
59
59
            raise TestSkipped("can't test sources in frozen distributions.")
60
60
        path = package.__file__
61
61
        if path[-1] in 'co':