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-07-22 13:18:39 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-22 13:18:39 (GMT)
commit53605902a0d842cb04c1f9378844e3afec33db8e (patch)
tree509c9d55b165a31474f2e4912e20c120c420416e /webactivity.py
parent336e98675742987620350ca08693f1af2a9723d6 (diff)
Disable xs_cookie creation, since it was trying to do it for gecko.
Diffstat (limited to 'webactivity.py')
-rw-r--r--webactivity.py43
1 files changed, 2 insertions, 41 deletions
diff --git a/webactivity.py b/webactivity.py
index 0be9232..4ebfdf0 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -85,48 +85,9 @@ def _seed_xs_cookie():
cookie_data = {'color': profile.get_color().to_string(),
'pkey_hash': sha1.new(pubkey).hexdigest()}
- db_path = os.path.join(_profile_path, 'cookies.sqlite')
- try:
- cookies_db = sqlite3.connect(db_path)
- c = cookies_db.cursor()
-
- c.execute('''CREATE TABLE IF NOT EXISTS
- moz_cookies
- (id INTEGER PRIMARY KEY,
- name TEXT,
- value TEXT,
- host TEXT,
- path TEXT,
- expiry INTEGER,
- lastAccessed INTEGER,
- isSecure INTEGER,
- isHttpOnly INTEGER)''')
-
- c.execute('''SELECT id
- FROM moz_cookies
- WHERE name=? AND host=? AND path=?''',
- ('xoid', jabber_server, '/'))
-
- if c.fetchone():
- _logger.debug('seed_xs_cookie: Cookie exists already')
- return
+ # TODO set cookie for webkit
- expire = int(time.time()) + 10*365*24*60*60
- c.execute('''INSERT INTO moz_cookies (name, value, host,
- path, expiry, lastAccessed,
- isSecure, isHttpOnly)
- VALUES(?,?,?,?,?,?,?,?)''',
- ('xoid', cjson.encode(cookie_data), jabber_server,
- '/', expire, 0, 0, 0 ))
- cookies_db.commit()
- cookies_db.close()
- except sqlite3.Error, e:
- _logger.error('seed_xs_cookie: %s' % e)
- else:
- _logger.debug('seed_xs_cookie: Updated cookie successfully')
-
-
-#TODO set app version and profile path
+#TODO set app version? and profile path
def _set_accept_languages():
''' Set intl.accept_languages based on the locale