|
|
@ -9,11 +9,11 @@ class ThunderbirdNotFound(LookupError): |
|
|
|
|
|
|
|
|
|
|
|
def profile_path(thunderbird_base): |
|
|
|
from configparser import ConfigParser |
|
|
|
config = ConfigParser() |
|
|
|
from ConfigParser import SafeConfigParser |
|
|
|
config = SafeConfigParser() |
|
|
|
filename = os.path.join(thunderbird_base, 'profiles.ini') |
|
|
|
config.read(filename) |
|
|
|
for section in config: |
|
|
|
for section in config.sections(): |
|
|
|
try: |
|
|
|
if config.get(section, 'Name') == 'default-release': |
|
|
|
return os.path.join(thunderbird_base, config.get(section, 'Path')) |
|
|
@ -24,7 +24,7 @@ def profile_path(thunderbird_base): |
|
|
|
def enigmail_agentPath(thunderbird_base): |
|
|
|
from fileinput import input |
|
|
|
import re |
|
|
|
c = re.compile(r'user_pref\(["\']extensions\.enigmail\.agentPath["\'],\s*["\'](?P<path>[^"\']*)["\']\);') |
|
|
|
c = re.compile(r'user_pref\(["\']extensions\.enigmail\.agentPath["\'],\s*["\'](?P<path>[^"\']*)["\']\);', re.UNICODE) |
|
|
|
filename = os.path.join(profile_path(thunderbird_base), 'prefs.js') |
|
|
|
for line in input(files=(filename,)): |
|
|
|
m = c.search(line) |
|
|
|