Changeset 4542

Show
Ignore:
Timestamp:
10/20/08 04:48:13 (3 months ago)
Author:
cboos
Message:

GraphvizPlugin: small refactoring of the _find_cmd helper method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • graphvizplugin/0.11/graphviz/graphviz.py

    r4541 r4542  
    495495 
    496496        if self.png_anti_alias: 
    497             self.rsvg_path = self.rsvg_path_option or \ 
    498                     self._find_cmd('rsvg', cmd_paths) 
    499              
     497            self.rsvg_path = (self.rsvg_path_option or  
     498                              self._find_cmd('rsvg', cmd_paths)) 
    500499            if not (self.rsvg_path and os.path.exists(self.rsvg_path)): 
    501500                return _("The rsvg program is set to '%(path)s' but that path " 
     
    625624            exe_suffix = '.exe' 
    626625 
    627         pname = None 
    628626        for path in paths: 
    629627            p = os.path.join(path, cmd) + exe_suffix 
    630628            if os.path.exists(p): 
    631                 pname = p 
    632                 break 
    633  
    634         return pname 
     629                return p