Skip to content

Commit

Permalink
Support Python2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
equalsraf committed Mar 6, 2015
1 parent 5c5a584 commit f55b77f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: python
python:
- "3.4"
- "3.3"
- "2.7"
install:
- sudo apt-get update
- sudo apt-get install vlc
Expand Down
10 changes: 8 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@

import subprocess, os
from flask import Flask, request, render_template, jsonify
import json
import json, sys
from logging import warn
from vlccontrol import VlcControl, VlcControlException
import queue
from threading import Thread
import redis

if sys.version_info < (3, 0):
# Python2 compatibility
ConnectionRefusedError = EOFError
import Queue as queue
else:
import queue

HOSTNAME = 'localhost'
PORT = 4212
# FIXME: deprecate this in favour of API arguments
Expand Down

0 comments on commit f55b77f

Please sign in to comment.