added travis config, communicator now can start in debug+dev mode
This commit is contained in:
parent
9853a4ce47
commit
e1aea96f11
7
.travis.yml
Normal file
7
.travis.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- "3.6.4"
|
||||||
|
# install dependencies
|
||||||
|
install:
|
||||||
|
- pip install -r requirements.txt
|
||||||
|
script: ./tests.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
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
'''
|
'''
|
||||||
import sqlite3, requests, hmac, hashlib, time, sys
|
import sqlite3, requests, hmac, hashlib, time, sys, os
|
||||||
import core
|
import core
|
||||||
class OnionrCommunicate:
|
class OnionrCommunicate:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -47,10 +47,14 @@ class OnionrCommunicate:
|
|||||||
response = r.text
|
response = r.text
|
||||||
return response
|
return response
|
||||||
shouldRun = False
|
shouldRun = False
|
||||||
|
debug = False
|
||||||
|
developmentMode = False
|
||||||
|
if os.path.exists('dev-enabled'):
|
||||||
|
developmentMode = True
|
||||||
try:
|
try:
|
||||||
if sys.argv[1] == 'run':
|
if sys.argv[1] == 'run':
|
||||||
shouldRun = True
|
shouldRun = True
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
if shouldRun:
|
if shouldRun:
|
||||||
OnionrCommunicate()
|
OnionrCommunicate(debug, developmentMode)
|
Loading…
Reference in New Issue
Block a user