Changeset 589


Ignore:
Timestamp:
Nov 21, 2015, 11:46:46 PM (4 years ago)
Author:
cito
Message:

The file type is gone in Python 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/pg.py

    r568 r589  
    333333            if isinstance(self.debug, basestring):
    334334                print(self.debug % s)
    335             elif isinstance(self.debug, file):
    336                 file.write(s + '\n')
     335            elif hasattr(self.debug, 'write'):
     336                debug.write(s + '\n')
    337337            elif callable(self.debug):
    338338                self.debug(s)
Note: See TracChangeset for help on using the changeset viewer.