Added compatibility for pickle

I saw not every platform has cPickle available so I added this try-except for pickle.
Hi

the str() was not a problem (I just made it explicitly) but the coma separated Exception: ‘’' IOError, e: ‘’' failed the unittest in the latest Python version at Mac (python 2.7.5) also with the latest nosetest version. With the fix everything works as it should (and the tests pass).


On 19 Jul 2014, at 15:27, Radim Řehůřek <notifications@github.com> wrote:

> In sqlitedict.py:
> 
> >          if self.filename == ':memory:':
> >              return
> >  
> >          logger.info("deleting %s" % self.filename)
> >          try:
> >              os.remove(self.filename)
> > -        except IOError, e:
> > -            logger.warning("failed to delete %s: %s" % (self.filename, e))
> > +        except IOError as e:
> > +            logger.warning("failed to delete %s: %s" % (self.filename, str(e)))
> AFAIK %s calls str automatically... where exactly did this fail?
> 
> —
> Reply to this email directly or view it on GitHub.
>