mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-14 07:41:07 +01:00
e5137a8468
Also created a custom .pylintrc file that disables a few warnings, but for the most part, gitinspector now follows proper python guidelines.
28 lines
917 B
Python
28 lines
917 B
Python
# coding: utf-8
|
|
#
|
|
# Copyright © 2012 Ejwa Software. All rights reserved.
|
|
#
|
|
# This file is part of gitinspector.
|
|
#
|
|
# gitinspector is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# gitinspector is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
import os
|
|
|
|
def run(directory, command):
|
|
previous_directory = os.getcwd()
|
|
os.chdir(directory)
|
|
result = os.popen(command)
|
|
os.chdir(previous_directory)
|
|
|
|
return result
|