Skip to content

Commit

Permalink
Pushing - doing linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Sep 3, 2013
1 parent c6c0539 commit ec5705b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions python-api/Makefile
Expand Up @@ -3,9 +3,9 @@
lint:
mkdir -p reports
mkdir -p reports/pylint
-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
-pylint --disable=E0611 --disable=E0202 --disable=R0801 --rcfile=.pylintrc gstswitch
-pylint --disable=E0611 --disable=E0202 --disable=R0801 --rcfile=.pylintrc tests/unittests/*
-pylint --disable=E0611 --disable=E0202 --disable=R0801 --rcfile=.pylintrc tests/integrationtests/*.py
mv -f *.html reports/pylint
@echo "Lint report generated in reports/pylint"

Expand Down
4 changes: 4 additions & 0 deletions python-api/gstswitch/exception.py
@@ -1,3 +1,7 @@
"""
All custom exceptions come here
"""

__all__ = [
'BaseError', 'PathError', 'ServerProcessError', 'ConnectionError',
'ConnectionReturnError', 'RangeError', 'InvalidIndexError',
Expand Down
12 changes: 9 additions & 3 deletions python-api/gstswitch/testsource.py
@@ -1,11 +1,17 @@
"""
The testsource contains all gstreamer pipelines
It provides the abse for all the other gstreamer
components are build upon.
"""

import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst

GObject.threads_init()
Gst.init(None)

from exception import RangeError
from .exception import RangeError
import random

# from pipeline import *
Expand All @@ -19,7 +25,6 @@ class BasePipeline(Gst.Pipeline):
"""

def __init__(self):
super(BasePipeline, self).__init__()
Gst.Pipeline.__init__(self)
self._playing = False

Expand Down Expand Up @@ -122,7 +127,8 @@ def make_capsfilter(self, width, height):
element = self.make("capsfilter", "vfilter")
width = str(width)
height = str(height)
capsstring = "video/x-raw, format=(string)I420, width={0}, height={1}".format(width, height)
capsstring = "video/x-raw, format=(string)I420, width={0},\
height={1}".format(width, height)
print capsstring
caps = Gst.Caps.from_string(capsstring)
element.set_property('caps', caps)
Expand Down

0 comments on commit ec5705b

Please sign in to comment.