<commit_before># -*- coding: utf-8 -*-

import logging
import storj

from .utilities.account_manager import AccountManager


class StorjEngine:

    __logger = logging.getLogger('%s.StorjEngine' % __name__)

    def __init__(self):
        self.account_manager = AccountManager()
        self.password = <PASSWORD>
        if self.account_manager.if_logged_in():
            self.password = self.account_manager.get_user_password()
            self.email = self.account_manager.get_user_email()

            # initialize Storj
            self.storj_client = storj.Client(
                email=self.email,
                password=self.password,
                do_hashing=False, timeout=15)
            self.__logger.debug('Login from credentials xml file')
        self.__logger.debug('testlogin, StorjEngine')<commit_msg>Respect config<commit_after>from utilities.account_manager import AccountManager
from utilities.backend_config import Configuration
import storj
from utilities.log_manager import logger


class StorjEngine:

    def __init__(self):
        self.conf_manager = Configuration()
        self.account_manager = AccountManager()
        self.password = <PASSWORD>
        if self.account_manager.if_logged_in():
            self.password = self.account_manager.get_user_password()
            self.email = self.account_manager.get_user_email()
            # initialize Storj
            max_bridge_request_timeout = self.conf_manager.get_max_bridge_request_timeout()
            print "Using Bridge timeout: " + str(max_bridge_request_timeout)
            self.storj_client = storj.Client(email=self.email,
                                             password=self.password,
                                             do_hashing=False,
                                             timeout=max_bridge_request_timeout)
            logger.debug("Login from credentials xml file")
        logger.debug("testlogin, StorjEngine")
{'fraction_non_alphanumeric': 0.08016443987667009, 'fraction_numerical': 0.001541623843782117, 'mean_word_length': 2.333904109589041, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2037430', 'n_tokens_mistral': 509, 'n_tokens_neox': 495, 'n_words': 94}