diff --git a/.travis-run.sh b/.travis-run.sh index 1c4a1f1..cadf3b7 100755 --- a/.travis-run.sh +++ b/.travis-run.sh @@ -24,7 +24,7 @@ case $TEST in ;; c ) make test - cd .. - coveralls -r tools/ + cd ../tools + coveralls -r . esac esac \ No newline at end of file diff --git a/.travis-setup.sh b/.travis-setup.sh index ab60c03..187d396 100755 --- a/.travis-setup.sh +++ b/.travis-setup.sh @@ -53,9 +53,7 @@ make sudo make install if [ $TYPE == 'c' ]; then - git clone https://github.com/hyades/cpp-coveralls.git - cd cpp-coveralls - sudo python setup.py install + sudo pip install cpp-coveralls else sudo pip install python-coveralls fi diff --git a/python-api/Makefile b/python-api/Makefile index ceb58af..428617f 100644 --- a/python-api/Makefile +++ b/python-api/Makefile @@ -3,9 +3,9 @@ lint: mkdir -p reports mkdir -p reports/pylint - -pylint --rcfile=.pylintrc gstswitch - -pylint --rcfile=.pylintrc tests/unittests/* - -pylint --rcfile=.pylintrc tests/integrationtests/*.py + -pylint --disable=E0611 --disable=E0202 --rcfile=.pylintrc gstswitch + -pylint --disable=E0611 --disable=E0202 --rcfile=.pylintrc tests/unittests/* + -pylint --disable=E0611 --disable=E0202 --rcfile=.pylintrc tests/integrationtests/*.py mv -f *.html reports/pylint @echo "Lint report generated in reports/pylint" diff --git a/python-api/gstswitch/connection.py b/python-api/gstswitch/connection.py index 25f3c58..8bab645 100644 --- a/python-api/gstswitch/connection.py +++ b/python-api/gstswitch/connection.py @@ -1,7 +1,10 @@ -#IMPORTS -#all dbus variables need to be setup here +""" +connection deals with all low level method calls over dbus +The Connection object is capable of invoking remote methods over dbus +""" + from gi.repository import Gio, GLib -from exception import ConnectionError +from ..gstswitch.exception import ConnectionError import sys __all__ = ["Connection", ] @@ -26,6 +29,10 @@ def __init__( super(Connection, self).__init__() self.connection = None + self._address = None + self._bus_name = None + self._object_path = None + self._default_interface = None self.address = address self.bus_name = bus_name @@ -34,6 +41,8 @@ def __init__( @property def address(self): + """Get the address + """ return self._address @address.setter @@ -54,6 +63,7 @@ def address(self, address): @property def bus_name(self): + """Get the bus name""" if self._bus_name is None: return None return self._bus_name @@ -71,6 +81,7 @@ def bus_name(self, bus_name): @property def object_path(self): + """Get the object path""" return self._object_path @object_path.setter @@ -93,6 +104,7 @@ def object_path(self, object_path): @property def default_interface(self): + """Get the default interface""" return self._default_interface @default_interface.setter