Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Build a commit message that uses the provided ControlConfig object and
return a reference to the resulting file. 

        def buildmessagefile(config):
    """ Build a commit message that uses the provided ControlConfig object and
        return a reference to the resulting file. """
    config.init()

    msg_filename = '/tmp/git_msg_%d' % random.randint(0,1000)

    # try to avoid clobbering another process running this script
    while os.path.exists(msg_filename):
        msg_filename = '/tmp/git_msg_%d' % random.randint(0,1000)

    connectable = False
    connected = False

    message_file = open(msg_filename, 'w')
    try:
        for plugin in config.msg_plugins:
            plugin_success = plugin.addcontext(message_file, config)
            # let each plugin say which ones attempt network connections
            if plugin.connectable:
                connectable = True
                connected = connected or plugin_success
        if connectable and not connected:
            message_file.write('All of the plugins that use the network failed.\n')
            message_file.write('Your computer may not be connected to the network.')
    finally:
        message_file.close()
    return msg_filename
        


src/f/l/flashbake-HEAD/src/flashbake/console.py   flashbake(Download)
        (hot_files, control_config) = control.prepare_control(hot_files, control_config)
 
        msg_filename = context.buildmessagefile(control_config)
        message_file = open(msg_filename, 'r')
 

src/f/l/flashbake-0.27/src/flashbake/console.py   flashbake(Download)
        (hot_files, control_config) = control.prepare_control(hot_files, control_config)
 
        msg_filename = context.buildmessagefile(control_config)
        message_file = open(msg_filename, 'r')
 

src/f/l/flashbake-HEAD/test/test.py   flashbake(Download)
        from flashbake.commit import commit #@UnusedImport
        from flashbake.control import parse_control #@UnusedImport
        from flashbake.context import buildmessagefile #@UnusedImport
        import test.config
        import test.files

src/f/l/flashbake-HEAD/test/config.py   flashbake(Download)
    def testnoaddcontext(self):
        try:
            self.config.plugin_names = ['test.plugins:NoAddContext']
            from flashbake.context import buildmessagefile
            buildmessagefile(self.config)
        self.config.plugin_names = ['flashbake.plugins.feed:Feed']
        self.config.extra_props['feed_url'] = "http://twitter.com/statuses/user_timeline/704593.rss"
        from flashbake.context import buildmessagefile
        buildmessagefile(self.config)
 

src/f/l/flashbake-0.27/test/test.py   flashbake(Download)
        from flashbake.commit import commit #@UnusedImport
        from flashbake.control import parse_control #@UnusedImport
        from flashbake.context import buildmessagefile #@UnusedImport
        import test.config
        import test.files