Skip to content

Commit

Permalink
lint and docs for connection.py, modified travis scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Sep 3, 2013
1 parent 808797d commit f22fcbb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .travis-run.sh
Expand Up @@ -24,7 +24,7 @@ case $TEST in
;;
c )
make test
cd ..
coveralls -r tools/
cd ../tools
coveralls -r .
esac
esac
4 changes: 1 addition & 3 deletions .travis-setup.sh
Expand Up @@ -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
6 changes: 3 additions & 3 deletions python-api/Makefile
Expand Up @@ -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"

Expand Down
18 changes: 15 additions & 3 deletions 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", ]
Expand All @@ -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
Expand All @@ -34,6 +41,8 @@ def __init__(

@property
def address(self):
"""Get the address
"""
return self._address

@address.setter
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f22fcbb

Please sign in to comment.