diff options
| author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-02 18:08:55 +0100 |
|---|---|---|
| committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-02 18:08:55 +0100 |
| commit | a822f0acdbbfdd4b574675190639ec2c59823f93 (patch) | |
| tree | 643d877f087c5db4c3c5f16a970c1a230dd0eba9 /config.py | |
| parent | 73d9b2e77a9bda67a69a6a43827edc52a5056bc4 (diff) | |
| download | pylint-a822f0acdbbfdd4b574675190639ec2c59823f93.tar.gz | |
py3k: pickle needs a byte IO
Diffstat (limited to 'config.py')
| -rw-r--r-- | config.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -60,14 +60,19 @@ def load_results(base): except: return {} +if sys.version_info < (3, 0): + _PICK_MOD = 'w' +else: + _PICK_MOD = 'wb' + def save_results(results, base): """pickle results""" data_file = get_pdata_path(base, 1) try: - pickle.dump(results, open(data_file, 'w')) + pickle.dump(results, open(data_file, _PICK_MOD)) except (IOError, OSError), ex: print >> sys.stderr, 'Unable to create file %s: %s' % (data_file, ex) - + # location of the configuration file ########################################## |
