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 | d4ac15ea474363cd8866dc5b56bb003db763c2a8 (patch) | |
| tree | f735c77f393e2a5ef4ea345dbbdb732458248269 /config.py | |
| parent | 329598bb0ee56a8b0e1d7b97ee1c19fc1b018184 (diff) | |
| download | pylint-git-d4ac15ea474363cd8866dc5b56bb003db763c2a8.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 ########################################## |
