duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] Version 0.5.04 on openSuse 11.1 - deprecation warning


From: Michael Schneider
Subject: [Duplicity-talk] Version 0.5.04 on openSuse 11.1 - deprecation warning
Date: Sun, 28 Dec 2008 17:40:32 +0100

Dear all,

after upgrading my OS to Opensuse 11.1 and installing duplicity 0.5.04,
I get the following warnings:
/usr/lib/python2.6/site-packages/duplicity/gpg.py:23: DeprecationWarning: the sha module is deprecated;
/usr/lib/python2.6/site-packages/duplicity/gpg.py:23: DeprecationWarning: the md5 module is deprecated;

I got rid of these warnings by patching gpg.py as follows:

*** gpg.py      2008-12-28 17:32:06.000000000 +0100
--- gpg.py.orig 2008-12-28 15:30:45.000000000 +0100
***************
*** 21,25 ****
  """duplicity's gpg interface, builds upon Frank Tobin's GnuPGInterface"""

! import select, os, sys, thread, hashlib, types, cStringIO, tempfile, re, gzip
  import GnuPGInterface, misc, log

--- 21,25 ----
  """duplicity's gpg interface, builds upon Frank Tobin's GnuPGInterface"""

! import select, os, sys, thread, sha, md5, types, cStringIO, tempfile, re, gzip
  import GnuPGInterface, misc, log

***************
*** 304,310 ****
      fp = path.open("rb")
      if hash == "SHA1":
!         hash_obj = hashlib.sha1()
      elif hash == "MD5":
!         hash_obj = hashlib.md5()
      else:
          assert 0, "Unknown hash %s" % (hash,)
--- 304,310 ----
      fp = path.open("rb")
      if hash == "SHA1":
!         hash_obj = sha.new()
      elif hash == "MD5":
!         hash_obj = md5.new()
      else:
          assert 0, "Unknown hash %s" % (hash,)

Cheers,
Mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]