Changeset - 1e4aaf9a58a6
[Not reviewed]
default
0 1 0
domruf - 9 years ago 2017-05-10 22:42:37
dominikruf@gmail.com
fcs: remove unused run_command - it doesn't work anyway

"Instance of 'Popen' has no 'retcode' member" found by pylint.
1 file changed with 0 insertions and 10 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/utils/helpers.py
Show inline comments
 
@@ -90,34 +90,24 @@ def get_scms_for_path(path):
 
            get_backend(key)(path)
 
            result.append(key)
 
            continue
 
        except RepositoryError:
 
            # Wrong backend
 
            pass
 
        except VCSError:
 
            # No backend at all
 
            pass
 
    return result
 

	
 

	
 
def run_command(cmd, *args):
 
    """
 
    Runs command on the system with given ``args``.
 
    """
 
    command = ' '.join((cmd, args))
 
    p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
 
    stdout, stderr = p.communicate()
 
    return p.retcode, stdout, stderr
 

	
 

	
 
def get_highlighted_code(name, code, type='terminal'):
 
    """
 
    If pygments are available on the system
 
    then returned output is colored. Otherwise
 
    unchanged content is returned.
 
    """
 
    import logging
 
    try:
 
        import pygments
 
        pygments
 
    except ImportError:
 
        return code
0 comments (0 inline, 0 general)