[nautilus-python/0.5: 8/11] Backport from 0.6, Updated the property page example to import hashlib instead of the deprecated md5
- From: Adam Plumb <adamplumb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-python/0.5: 8/11] Backport from 0.6, Updated the property page example to import hashlib instead of the deprecated md5
- Date: Fri, 26 Feb 2010 21:39:30 +0000 (UTC)
commit 82aa8a7c107b6945414603526e7efd73f6423ece
Author: Adam Plumb <adamplumb gmail com>
Date: Fri Feb 26 16:34:09 2010 -0500
Backport from 0.6, Updated the property page example to import hashlib instead of the deprecated md5 module
examples/md5sum-property-page.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/examples/md5sum-property-page.py b/examples/md5sum-property-page.py
index 81b3b29..271c18a 100644
--- a/examples/md5sum-property-page.py
+++ b/examples/md5sum-property-page.py
@@ -1,4 +1,4 @@
-import md5
+import hashlib
import urllib
import gtk
@@ -34,7 +34,7 @@ class MD5SumPropertyPage(nautilus.PropertyPageProvider):
self.value_label = gtk.Label()
self.hbox.pack_start(self.value_label)
- md5sum = md5.md5(filename).hexdigest()
+ md5sum = hashlib.md5(filename).hexdigest()
self.value_label.set_text(md5sum)
self.value_label.show()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]