<commit_before>'''
Created on Jan 12, 2015

__author__ = "Elizabeth 'pidge' Flanagan"
__copyright__ = "Copyright 2012-2015, Intel Corp."
__credits__ = ["<NAME>"]
__license__ = "GPL"
__version__ = "2.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
'''


from buildbot.steps.shell import ShellCommand
from buildbot.process.buildstep import LogLineObserver
from autobuilder.config import *
import os

class UpdateBuildHistory(ShellCommand):
    haltOnFailure = False
    flunkOnFailure = False
    name = "Update Build History"
    def __init__(self, factory, argdict=None, **kwargs):
        self.machines=""
        self.factory = factory
        for k, v in argdict.iteritems():
            setattr(self, k, v)
        # Timeout needs to be passed to LoggingBuildStep as a kwarg
        self.timeout = 100000
        kwargs['timeout']=self.timeout
        ShellCommand.__init__(self, **kwargs)

    def start(self):
        if os.environ.get('BUILD_HISTORY_WHITELIST') is not None:
            history_repos=ast.literal_eval(os.environ.get('BUILD_HISTORY_WHITELIST').encode('utf-8'))
            if history_repos is not None and repo in history_repos.keys():
                bhw_dir = self.getProperty("BUILD_HISTORY_WEB_DIR")
                bh_dir = self.getProperty("BUILD_HISTORY_DIR")
                pokydir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"), self.getProperty("buildername")) + "/poky"
                for machine in self.machines
                    self.command =+ os.path.join(bhw_dir + "/warningmgr/import.py") + " -m " + \
                                 machine + " -b " + machine + " " pokydir + \
                                 " " + bh_dir + "/" + machine + ";"
        else:
            self.command = "echo 'Skipping Step.'"
        ShellCommand.start(self)
<commit_msg>UpdateBuildHistory.py: fix syntax errors<commit_after>'''
Created on Jan 12, 2015

__author__ = "Elizabeth 'pidge' Flanagan"
__copyright__ = "Copyright 2012-2015, Intel Corp."
__credits__ = ["<NAME>"]
__license__ = "GPL"
__version__ = "2.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
'''


from buildbot.steps.shell import ShellCommand
from buildbot.process.buildstep import LogLineObserver
from autobuilder.config import *
import os

class UpdateBuildHistory(ShellCommand):
    haltOnFailure = False
    flunkOnFailure = False
    name = "Update Build History"
    def __init__(self, factory, argdict=None, **kwargs):
        self.machines=""
        self.factory = factory
        for k, v in argdict.iteritems():
            setattr(self, k, v)
        # Timeout needs to be passed to LoggingBuildStep as a kwarg
        self.timeout = 100000
        kwargs['timeout']=self.timeout
        ShellCommand.__init__(self, **kwargs)

    def start(self):
        if os.environ.get('BUILD_HISTORY_WHITELIST') is not None:
            history_repos=ast.literal_eval(os.environ.get('BUILD_HISTORY_WHITELIST').encode('utf-8'))
            if history_repos is not None and repo in history_repos.keys():
                bhw_dir = self.getProperty("BUILD_HISTORY_WEB_DIR")
                bh_dir = self.getProperty("BUILD_HISTORY_DIR")
                pokydir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"), self.getProperty("buildername")) + "/poky"
                for machine in self.machines:
                    self.command += os.path.join(bhw_dir + "/warningmgr/import.py") + " -m " + \
                                 machine + " -b " + machine + " " + pokydir + \
                                 " " + bh_dir + "/" + machine + ";"
        else:
            self.command = "echo 'Skipping Step.'"
        ShellCommand.start(self)

{'fraction_non_alphanumeric': 0.11912568306010929, 'fraction_numerical': 0.012568306010928962, 'mean_word_length': 2.526974951830443, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5937817', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1111, 'n_words': 251}