Skip to content

Commit

Permalink
Merge branch 'review/fix-travis-issues'
Browse files Browse the repository at this point in the history
Closing pull request: Review/fix travis issues #198
  • Loading branch information
fightling committed Apr 23, 2018
2 parents ceab271 + 2e7e4fd commit 24ffe7f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
5 changes: 3 additions & 2 deletions voctocore/lib/sources/decklinkavsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


class DeckLinkAVSource(AVSource):

def __init__(self, name, outputs=None, has_audio=True, has_video=True):
self.log = logging.getLogger('DecklinkAVSource[{}]'.format(name))
super().__init__(name, outputs, has_audio, has_video)
Expand Down Expand Up @@ -94,15 +95,15 @@ def _parse_audiostream_map(self, config_section):

for key in Config[config_section]:
value = Config.get(config_section, key)
m = re.match('audiostream\[(\d+)\]', key)
m = re.match(r'audiostream\[(\d+)\]', key)
if m:
audiostream = int(m.group(1))
audiostream_map[audiostream] = value

return audiostream_map

def _parse_audiostream_mapping(self, mapping):
m = re.match('(\d+)\+(\d+)', mapping)
m = re.match(r'(\d+)\+(\d+)', mapping)
if m:
return (int(m.group(1)), int(m.group(2)),)
else:
Expand Down
2 changes: 1 addition & 1 deletion voctocore/tests/helper/voctomix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setUp(self):
lib.config.Config.resetToDefaults()

def assertContainsIgnoringWhitespace(self, text, search):
regex = search.replace(" ", "\s*")
regex = search.replace(" ", r"\s*")

try:
self.assertRegex(text, regex)
Expand Down
4 changes: 2 additions & 2 deletions voctocore/voctocore.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def main():
args.parse()

from lib.args import Args
docolor = (Args.color == 'always') or (Args.color == 'auto' and
sys.stderr.isatty())
docolor = (Args.color == 'always') \
or (Args.color == 'auto' and sys.stderr.isatty())

handler = LogHandler(docolor, Args.timestamp)
logging.root.addHandler(handler)
Expand Down
2 changes: 1 addition & 1 deletion voctogui/lib/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def establish(host):

log.info('establishing Connection to %s', host)
conn = socket.create_connection((host, port))
log.debug('Connection successful \o/')
log.debug(r'Connection successful \o/')

ip = conn.getpeername()[0]
log.debug('Remote-IP is %s', ip)
Expand Down
4 changes: 2 additions & 2 deletions voctogui/lib/videodisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def __init__(self, drawing_area, port, width=None, height=None,
else:
previewcaps = Config.get('mix', 'videocaps')

use_previews = (Config.getboolean('previews', 'enabled') and
Config.getboolean('previews', 'use'))
use_previews = Config.getboolean('previews', 'enabled') \
and Config.getboolean('previews', 'use')

# Preview-Ports are Raw-Ports + 1000
if use_previews:
Expand Down
9 changes: 5 additions & 4 deletions voctogui/voctogui.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

# main class
class Voctogui(object):

def __init__(self):
self.log = logging.getLogger('Voctogui')
from lib.args import Args
Expand Down Expand Up @@ -123,8 +124,8 @@ def main():
args.parse()

from lib.args import Args
docolor = (Args.color == 'always') or (Args.color == 'auto' and
sys.stderr.isatty())
docolor = (Args.color == 'always') \
or (Args.color == 'auto' and sys.stderr.isatty())

from lib.loghandler import LogHandler
handler = LogHandler(docolor, Args.timestamp)
Expand Down Expand Up @@ -165,8 +166,8 @@ def main():
# The list-comparison is not complete
# (one could use a local hostname or the local system ip),
# but it's only here to warn that one might be making a mistake
use_previews = (Config.getboolean('previews', 'enabled') and
Config.getboolean('previews', 'use'))
use_previews = Config.getboolean('previews', 'enabled') \
and Config.getboolean('previews', 'use')
looks_like_localhost = Config.get('server', 'host') in ['::1',
'127.0.0.1',
'localhost']
Expand Down

0 comments on commit 24ffe7f

Please sign in to comment.