Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webactivity.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-24 11:52:15 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-24 11:52:15 (GMT)
commit792c135e9aee821bf22640649228d3e5d035f568 (patch)
tree411af24daa25bb00983f7ad0b36abc2cc95ece68 /webactivity.py
parent980eaede8bf725f571fb81020d83e3e7702d8c42 (diff)
Prototype implementation of downloadmanager. Fix initial load bug. Introduce many other bugs. Not tested enough.
Diffstat (limited to 'webactivity.py')
-rw-r--r--webactivity.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/webactivity.py b/webactivity.py
index a68cc49..bb5a7c6 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -23,7 +23,6 @@ import gobject
gobject.threads_init()
import gtk
-import sha
import base64
import time
import shutil
@@ -31,6 +30,7 @@ import sqlite3
import cjson
import gconf
import locale
+from hashlib import sha1
import webkit
@@ -49,7 +49,7 @@ from sugar import mime
PROFILE_VERSION = 2
_profile_version = 0
-_profile_path = os.path.join(activity.get_activity_root(), 'data/gecko')
+_profile_path = os.path.join(activity.get_activity_root(), 'data/webkit')
_version_file = os.path.join(_profile_path, 'version')
if os.path.exists(_version_file):
@@ -83,7 +83,7 @@ def _seed_xs_cookie():
pubkey = profile.get_profile().pubkey
cookie_data = {'color': profile.get_color().to_string(),
- 'pkey_hash': sha.new(pubkey).hexdigest()}
+ 'pkey_hash': sha1.new(pubkey).hexdigest()}
db_path = os.path.join(_profile_path, 'cookies.sqlite')
try:
@@ -441,9 +441,9 @@ class WebActivity(activity.Activity):
uri = browser.props.uri
for link in self.model.data['shared_links']:
- if link['hash'] == sha.new(uri).hexdigest():
+ if link['hash'] == sha1.new(uri).hexdigest():
_logger.debug('_add_link: link exist already a=%s b=%s' %(
- link['hash'], sha.new(uri).hexdigest()))
+ link['hash'], sha1.new(uri).hexdigest()))
return
buf = self._get_screenshot()
timestamp = time.time()