Changeset 754

Show
Ignore:
Timestamp:
05/29/07 11:01:32 (6 years ago)
Author:
bass_boy
Message:

Security.xml

Location:
branch/bass_boy
Files:
3 added
4 modified

Legend:

Unmodified
Added
Removed
  • branch/bass_boy/umitGUI/App.py

    r727 r754  
    2323import sys 
    2424import optparse 
    25 import imp 
    2625 
    2726import gtk 
     
    3837 
    3938# Script found at http://www.py2exe.org/index.cgi/HowToDetermineIfRunningFromExe 
     39import imp 
     40frozen = (hasattr(sys, "frozen") or # new py2exe 
     41          hasattr(sys, "importers") # old py2exe 
     42          or imp.is_frozen("__main__")) # tools/freeze 
     43del(imp) 
     44 
    4045def main_is_frozen(): 
    41     return (hasattr(sys, "frozen") or # new py2exe 
    42             hasattr(sys, "importers") # old py2exe 
    43             or imp.is_frozen("__main__")) # tools/freeze 
     46    return frozen 
    4447 
    4548 
     
    5053    def __create_option_parser(self): 
    5154        self.option_parser = optparse.OptionParser() 
    52  
    5355        self.options, self.args = self.option_parser.parse_args() 
    5456 
     
    6769 
    6870    def run(self): 
    69  
    7071        # Try to load psyco module, saving this information 
    7172        # if we care to use it later (such as in a About Dialog) 
     
    8081but you're encourajed to install it to have a better speed experience. Download it \ 
    8182at http://psyco.sf.net/""")) 
    82  
    8383            self.using_psyco = False 
    8484 
  • branch/bass_boy/umitGUI/ScanNotebook.py

    r727 r754  
    4343from umitCore.I18N import _ 
    4444 
    45 icon_dir = Path.get_pixmaps_dir() 
     45icon_dir = Path.pixmaps_dir 
    4646 
    4747class PageStatus(object): 
  • branch/bass_boy/umitWeb/media/js/ajax.js

    r682 r754  
    99    $("result").innerHTML = "loading..." 
    1010    displayResult = function(){ 
    11         if(req.readyState == 4){ 
    12             if(req.status == 200){ 
    13                 $("result").innerHTML = "<pre>" + req.responseText + "</pre>" 
    14             }else{ 
    15                 $("result").innerHTML = req.statusText 
     11         try{ 
     12            if(req.readyState == 4){ 
     13                if(req.status == 200){ 
     14                    $("result").innerHTML = "<pre>" + req.responseText + "</pre>" 
     15                }else{ 
     16                    $("result").innerHTML = req.statusText 
     17                } 
    1618            } 
     19        }catch(e){ 
     20            alert(e) 
     21            $("result").innerHTML = "Could not open Http Request." 
    1722        } 
    1823    } 
    19      
    20     req.open("POST", "/scan/?plain", true) 
    21     req.onreadystatechange = displayResult 
    22     req.send("command=" + encodeURI($("command").value)) 
     24    try{ 
     25        req.open("POST", "/scan/?plain", true) 
     26        req.onreadystatechange = displayResult 
     27        req.send("command=" + encodeURI($("command").value)) 
     28    }catch(e){ 
     29        $("result").innerHTML = "Could not open Http Request." 
     30    } 
     31 
    2332    return false 
    2433} 
  • branch/bass_boy/umitweb.py

    r729 r754  
    2727# Setting the umit home directory 
    2828 
    29 #from umitCore.Paths import Path 
    30 #Path.set_umit_conf(join(split(__file__)[0], 'config', 'umit.conf')) 
     29from umitCore.Paths import Path 
     30Path.set_umit_conf(join(split(__file__)[0], 'config', 'umit.conf')) 
    3131###################################### 
    3232