Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Add server version to settings API return
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacia committed Oct 28, 2016
1 parent 6efb928 commit 853ba90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion api/restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from twisted.internet import defer, reactor, task
from twisted.protocols.basic import FileSender

from config import DATA_FOLDER, RESOLVER, delete_value, set_value, get_value, str_to_bool, TRANSACTION_FEE
from config import DATA_FOLDER, RESOLVER, delete_value, set_value, get_value, str_to_bool, TRANSACTION_FEE, \
SERVER_VERSION
from protos.countries import CountryCode
from protos import objects
from keys import blockchainid
Expand Down Expand Up @@ -945,6 +946,7 @@ def get_settings(self, request):
"smtp_recipient": settings[17],
"smtp_username": settings[18],
"smtp_password": settings[19],
"version": SERVER_VERSION
}
mods = []
try:
Expand Down
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ConfigParser import ConfigParser
from urlparse import urlparse

SERVER_VERSION = "0.2.3"
PROTOCOL_VERSION = 2
CONFIG_FILE = join(os.getcwd(), 'ob.cfg')

Expand Down
5 changes: 2 additions & 3 deletions openbazaard.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
from api.restapi import RestAPI
from config import DATA_FOLDER, KSIZE, ALPHA, LIBBITCOIN_SERVERS,\
LIBBITCOIN_SERVERS_TESTNET, SSL_KEY, SSL_CERT, SEEDS, SEEDS_TESTNET, SSL
LIBBITCOIN_SERVERS_TESTNET, SSL_KEY, SSL_CERT, SEEDS, SEEDS_TESTNET, SSL, SERVER_VERSION
from daemon import Daemon
from db.datastore import Database
from dht.network import Server
Expand All @@ -37,7 +37,6 @@
from twisted.python import log, logfile
from txws import WebSocketFactory


def run(*args):
TESTNET = args[0]
LOGLEVEL = args[1]
Expand Down Expand Up @@ -303,6 +302,6 @@ def print_splash_screen():
print "\_______ / __/ \___ >___| /" + OKBLUE + "______ /(____ /_____ \(____ (____ /__|" + ENDC
print " \/|__| \/ \/ " + OKBLUE + " \/ \/ \/ \/ \/" + ENDC
print
print "OpenBazaar Server v0.2.1 starting..."
print "OpenBazaar Server " + SERVER_VERSION + " starting..."

Parser(OpenBazaard('/tmp/openbazaard.pid'))

0 comments on commit 853ba90

Please sign in to comment.