~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/util/configobj/configobj.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1024
1024
            else:
1025
1025
                self.configspec = None
1026
1026
            return
1027
 
        elif hasattr(infile, 'read'):
 
1027
        elif getattr(infile, 'read', None) is not None:
1028
1028
            # This supports file like objects
1029
1029
            infile = infile.read() or []
1030
1030
            # needs splitting into lines - but needs doing *after* decoding
2852
2852
    >>> uc2 = ConfigObj(file_like)
2853
2853
    >>> uc2 == uc
2854
2854
    1
2855
 
    >>> uc2.filename == None
 
2855
    >>> uc2.filename is None
2856
2856
    1
2857
2857
    >>> uc2.newlines == '\\r'
2858
2858
    1