def path(self): if "anonymous_profile_dir" in self.__dict__: return self.anonymous_profile_dir section = self._get_ini_section() assert section is not None, "Profile doesn't exist in profiles.ini" return os.path.join(utils.get_firefox_app_data_dir(), self.profile_ini.get(section, "Path"))
def get_profile_ini(): app_data_dir = utils.get_firefox_app_data_dir() profile_ini = ConfigParser.SafeConfigParser() profile_ini.read(os.path.join(app_data_dir, "profiles.ini")) return profile_ini