Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > d4db7b5092b5090e91377eb3dd3b8023 > files > 2699

flumotion-0.6.1-2.fc14.x86_64.rpm

<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>flumotion.worker.checks.cortado</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;flumotion ::
        <a href="flumotion.worker-module.html">Package&nbsp;worker</a> ::
        <a href="flumotion.worker.checks-module.html">Package&nbsp;checks</a> ::
        Module&nbsp;cortado
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="flumotion.worker.checks.cortado-module.html">Module flumotion.worker.checks.cortado</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment"># -*- Mode: Python -*-</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"># vi:si:et:sw=4:sts=4:ts=4</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-comment"># Flumotion - a streaming media server</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-comment"># Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com).</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-comment"># All rights reserved.</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-comment"># This file may be distributed and/or modified under the terms of</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-comment"># the GNU General Public License version 2 as published by</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-comment"># the Free Software Foundation.</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-comment"># This file is distributed without any warranty; without even the implied</tt> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-comment"># warranty of merchantability or fitness for a particular purpose.</tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-comment"># See "LICENSE.GPL" in the source distribution for more information.</tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-comment"># Licensees having purchased or holding a valid Flumotion Advanced</tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-comment"># Streaming Server license may use this file in accordance with the</tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-comment"># Flumotion Advanced Streaming Server Commercial License Agreement.</tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-comment"># See "LICENSE.Flumotion" in the source distribution for more information.</tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-comment"># Headers in this file shall remain intact.</tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">flumotion</tt><tt class="py-op">.</tt><tt id="link-0" class="py-name" targets="Module flumotion.admin.command.common=flumotion.admin.command.common-module.html,Package flumotion.common=flumotion.common-module.html,Module flumotion.common.common=flumotion.common.common-module.html"><a title="flumotion.admin.command.common
flumotion.common
flumotion.common.common" class="py-name" href="#" onclick="return doclink('link-0', 'common', 'link-0');">common</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module flumotion.common.log=flumotion.common.log-module.html,Package flumotion.extern.log=flumotion.extern.log-module.html,Module flumotion.extern.log.log=flumotion.extern.log.log-module.html,Method flumotion.extern.log.log.Loggable.log()=flumotion.extern.log.log.Loggable-class.html#log,Function flumotion.extern.log.log.log()=flumotion.extern.log.log-module.html#log,Function flumotion.twisted.integration.log()=flumotion.twisted.integration-module.html#log"><a title="flumotion.common.log
flumotion.extern.log
flumotion.extern.log.log
flumotion.extern.log.log.Loggable.log
flumotion.extern.log.log.log
flumotion.twisted.integration.log" class="py-name" href="#" onclick="return doclink('link-1', 'log', 'link-1');">log</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">flumotion</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name"><a title="flumotion.admin.command.common
flumotion.common
flumotion.common.common" class="py-name" href="#" onclick="return doclink('link-2', 'common', 'link-0');">common</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Module flumotion.common.messages=flumotion.common.messages-module.html"><a title="flumotion.common.messages" class="py-name" href="#" onclick="return doclink('link-3', 'messages', 'link-3');">messages</a></tt> <tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Class flumotion.common.messages.Result=flumotion.common.messages.Result-class.html"><a title="flumotion.common.messages.Result" class="py-name" href="#" onclick="return doclink('link-4', 'Result', 'link-4');">Result</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">flumotion</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Module flumotion.admin.command.component=flumotion.admin.command.component-module.html,Package flumotion.component=flumotion.component-module.html,Module flumotion.component.bouncers.component=flumotion.component.bouncers.component-module.html,Module flumotion.component.component=flumotion.component.component-module.html,Module flumotion.manager.component=flumotion.manager.component-module.html"><a title="flumotion.admin.command.component
flumotion.component
flumotion.component.bouncers.component
flumotion.component.component
flumotion.manager.component" class="py-name" href="#" onclick="return doclink('link-5', 'component', 'link-5');">component</a></tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Package flumotion.component.plugs=flumotion.component.plugs-module.html,Variable flumotion.launch.parse.Component.plugs=flumotion.launch.parse.Component-class.html#plugs"><a title="flumotion.component.plugs
flumotion.launch.parse.Component.plugs" class="py-name" href="#" onclick="return doclink('link-6', 'plugs', 'link-6');">plugs</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Package flumotion.component.plugs.cortado=flumotion.component.plugs.cortado-module.html,Module flumotion.component.plugs.cortado.cortado=flumotion.component.plugs.cortado.cortado-module.html,Module flumotion.worker.checks.cortado=flumotion.worker.checks.cortado-module.html"><a title="flumotion.component.plugs.cortado
flumotion.component.plugs.cortado.cortado
flumotion.worker.checks.cortado" class="py-name" href="#" onclick="return doclink('link-7', 'cortado', 'link-7');">cortado</a></tt><tt class="py-op">.</tt><tt id="link-8" class="py-name" targets="Module flumotion.component.plugs.cortado.cortado_location=flumotion.component.plugs.cortado.cortado_location-module.html"><a title="flumotion.component.plugs.cortado.cortado_location" class="py-name" href="#" onclick="return doclink('link-8', 'cortado_location', 'link-8');">cortado_location</a></tt> <tt class="py-keyword">import</tt> \ </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">     <tt id="link-9" class="py-name" targets="Function flumotion.component.plugs.cortado.cortado_location.getCortadoFilename()=flumotion.component.plugs.cortado.cortado_location-module.html#getCortadoFilename"><a title="flumotion.component.plugs.cortado.cortado_location.getCortadoFilename" class="py-name" href="#" onclick="return doclink('link-9', 'getCortadoFilename', 'link-9');">getCortadoFilename</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">"$Rev: 7161 $"</tt> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"> </tt>
<a name="checkCortado"></a><div id="checkCortado-def"><a name="L30"></a><tt class="py-lineno">30</tt> <a class="py-toggle" href="#" id="checkCortado-toggle" onclick="return toggle('checkCortado');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="flumotion.worker.checks.cortado-module.html#checkCortado">checkCortado</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="checkCortado-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="checkCortado-expanded"><a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">    <tt class="py-docstring">"""Check for cortado applet.</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-docstring">    @returns: a result containing the filename to the jar or None if it</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-docstring">        cannot be found</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-docstring">    @rtype: L{flumotion.common.messages.Result}</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">    <tt id="link-10" class="py-name"><a title="flumotion.common.log
flumotion.extern.log
flumotion.extern.log.log
flumotion.extern.log.log.Loggable.log
flumotion.extern.log.log.log
flumotion.twisted.integration.log" class="py-name" href="#" onclick="return doclink('link-10', 'log', 'link-1');">log</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Function flumotion.common.avltree.debug()=flumotion.common.avltree-module.html#debug,Module flumotion.common.debug=flumotion.common.debug-module.html,Method flumotion.common.testsuite.TestCase.debug()=flumotion.common.testsuite.TestCase-class.html#debug,Method flumotion.extern.command.command.Command.debug()=flumotion.extern.command.command.Command-class.html#debug,Method flumotion.extern.log.log.Loggable.debug()=flumotion.extern.log.log.Loggable-class.html#debug,Function flumotion.extern.log.log.debug()=flumotion.extern.log.log-module.html#debug,Function flumotion.twisted.integration.debug()=flumotion.twisted.integration-module.html#debug"><a title="flumotion.common.avltree.debug
flumotion.common.debug
flumotion.common.testsuite.TestCase.debug
flumotion.extern.command.command.Command.debug
flumotion.extern.log.log.Loggable.debug
flumotion.extern.log.log.debug
flumotion.twisted.integration.debug" class="py-name" href="#" onclick="return doclink('link-11', 'debug', 'link-11');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'cortadocheck'</tt><tt class="py-op">,</tt> <tt class="py-string">'Checking...'</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">    <tt id="link-12" class="py-name" targets="Variable flumotion.common.interfaces.IFile.filename=flumotion.common.interfaces.IFile-class.html#filename,Variable flumotion.common.registry.ComponentRegistry.filename=flumotion.common.registry.ComponentRegistry-class.html#filename,Variable flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug.filename=flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug-class.html#filename,Variable flumotion.component.plugs.request.RequestLoggerFilePlug.filename=flumotion.component.plugs.request.RequestLoggerFilePlug-class.html#filename"><a title="flumotion.common.interfaces.IFile.filename
flumotion.common.registry.ComponentRegistry.filename
flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug.filename
flumotion.component.plugs.request.RequestLoggerFilePlug.filename" class="py-name" href="#" onclick="return doclink('link-12', 'filename', 'link-12');">filename</a></tt> <tt class="py-op">=</tt> <tt id="link-13" class="py-name"><a title="flumotion.component.plugs.cortado.cortado_location.getCortadoFilename" class="py-name" href="#" onclick="return doclink('link-13', 'getCortadoFilename', 'link-9');">getCortadoFilename</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt id="link-14" class="py-name"><a title="flumotion.common.interfaces.IFile.filename
flumotion.common.registry.ComponentRegistry.filename
flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug.filename
flumotion.component.plugs.request.RequestLoggerFilePlug.filename" class="py-name" href="#" onclick="return doclink('link-14', 'filename', 'link-12');">filename</a></tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt class="py-string">'not found'</tt> </tt>
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line">        <tt class="py-name">msg</tt> <tt class="py-op">=</tt> <tt id="link-15" class="py-name"><a title="flumotion.common.interfaces.IFile.filename
flumotion.common.registry.ComponentRegistry.filename
flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug.filename
flumotion.component.plugs.request.RequestLoggerFilePlug.filename" class="py-name" href="#" onclick="return doclink('link-15', 'filename', 'link-12');">filename</a></tt> </tt>
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line"> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">    <tt id="link-16" class="py-name"><a title="flumotion.common.log
flumotion.extern.log
flumotion.extern.log.log
flumotion.extern.log.log.Loggable.log
flumotion.extern.log.log.log
flumotion.twisted.integration.log" class="py-name" href="#" onclick="return doclink('link-16', 'log', 'link-1');">log</a></tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="flumotion.common.avltree.debug
flumotion.common.debug
flumotion.common.testsuite.TestCase.debug
flumotion.extern.command.command.Command.debug
flumotion.extern.log.log.Loggable.debug
flumotion.extern.log.log.debug
flumotion.twisted.integration.debug" class="py-name" href="#" onclick="return doclink('link-17', 'debug', 'link-11');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'cortadocheck'</tt><tt class="py-op">,</tt> <tt class="py-string">'filename - %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">msg</tt><tt class="py-op">,</tt> <tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">    <tt class="py-name">result</tt> <tt class="py-op">=</tt> <tt id="link-18" class="py-name"><a title="flumotion.common.messages.Result" class="py-name" href="#" onclick="return doclink('link-18', 'Result', 'link-4');">Result</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">    <tt class="py-name">result</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Method flumotion.common.messages.Result.succeed()=flumotion.common.messages.Result-class.html#succeed"><a title="flumotion.common.messages.Result.succeed" class="py-name" href="#" onclick="return doclink('link-19', 'succeed', 'link-19');">succeed</a></tt><tt class="py-op">(</tt><tt id="link-20" class="py-name"><a title="flumotion.common.interfaces.IFile.filename
flumotion.common.registry.ComponentRegistry.filename
flumotion.component.plugs.adminaction.AdminActionLoggerFilePlug.filename
flumotion.component.plugs.request.RequestLoggerFilePlug.filename" class="py-name" href="#" onclick="return doclink('link-20', 'filename', 'link-12');">filename</a></tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">    <tt id="link-21" class="py-name"><a title="flumotion.common.log
flumotion.extern.log
flumotion.extern.log.log
flumotion.extern.log.log.Loggable.log
flumotion.extern.log.log.log
flumotion.twisted.integration.log" class="py-name" href="#" onclick="return doclink('link-21', 'log', 'link-1');">log</a></tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="flumotion.common.avltree.debug
flumotion.common.debug
flumotion.common.testsuite.TestCase.debug
flumotion.extern.command.command.Command.debug
flumotion.extern.log.log.Loggable.debug
flumotion.extern.log.log.debug
flumotion.twisted.integration.debug" class="py-name" href="#" onclick="return doclink('link-22', 'debug', 'link-11');">debug</a></tt><tt class="py-op">(</tt><tt class="py-string">'cortadocheck'</tt><tt class="py-op">,</tt> <tt class="py-string">'done, returning'</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">result</tt> </tt>
</div><a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Aug 11 21:33:29 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>