~ubuntu-branches/ubuntu/natty/lightning-extension/natty-security

« back to all changes in this revision

Viewing changes to mozilla/testing/mozbase/mozprofile/mozprofile/permissions.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-09-03 14:00:01 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20120903140001-iee9509f51oz7pqs
Tags: 1.8+build1-0ubuntu0.11.04.1
* New upstream stable release to support Thunderbird 16 (CALENDAR_1_8_BUILD1)
  - LP: #1062587

* Add extra Makefiles that are needed for the build
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This Source Code Form is subject to the terms of the Mozilla Public
2
 
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
 
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
2
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
 
3
# You can obtain one at http://mozilla.org/MPL/2.0/.
4
4
 
5
5
 
6
6
"""
349
349
    def clean_db(self):
350
350
        """Removed permissions added by mozprofile."""
351
351
 
 
352
        sqlite_file = os.path.join(self._profileDir, "permissions.sqlite")
 
353
        if not os.path.exists(sqlite_file):
 
354
            return
 
355
 
352
356
        # Open database and create table
353
 
        permDB = sqlite3.connect(os.path.join(self._profileDir, "permissions.sqlite"))
 
357
        permDB = sqlite3.connect(sqlite_file)
354
358
        cursor = permDB.cursor();
355
359
 
356
360
        # TODO: only delete values that we add, this would require sending in the full permissions object