diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..2d88d47a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: python +python: + - "3.6.4" +# install dependencies +install: + - pip install -r requirements.txt +script: ./tests.py diff --git a/communicator.py b/communicator.py index 13178458..70bd704e 100755 --- a/communicator.py +++ b/communicator.py @@ -19,7 +19,7 @@ and code to operate as a daemon, getting commands from the command queue databas You should have received a copy of the GNU General Public License along with this program. If not, see . ''' -import sqlite3, requests, hmac, hashlib, time, sys +import sqlite3, requests, hmac, hashlib, time, sys, os import core class OnionrCommunicate: def __init__(self): @@ -47,10 +47,14 @@ class OnionrCommunicate: response = r.text return response shouldRun = False +debug = False +developmentMode = False +if os.path.exists('dev-enabled'): + developmentMode = True try: if sys.argv[1] == 'run': shouldRun = True except IndexError: pass if shouldRun: - OnionrCommunicate() \ No newline at end of file + OnionrCommunicate(debug, developmentMode) \ No newline at end of file