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

Commit 853ba90

Browse files
committed
Add server version to settings API return
1 parent 6efb928 commit 853ba90

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

api/restapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
from twisted.internet import defer, reactor, task
1818
from twisted.protocols.basic import FileSender
1919

20-
from config import DATA_FOLDER, RESOLVER, delete_value, set_value, get_value, str_to_bool, TRANSACTION_FEE
20+
from config import DATA_FOLDER, RESOLVER, delete_value, set_value, get_value, str_to_bool, TRANSACTION_FEE, \
21+
SERVER_VERSION
2122
from protos.countries import CountryCode
2223
from protos import objects
2324
from keys import blockchainid
@@ -945,6 +946,7 @@ def get_settings(self, request):
945946
"smtp_recipient": settings[17],
946947
"smtp_username": settings[18],
947948
"smtp_password": settings[19],
949+
"version": SERVER_VERSION
948950
}
949951
mods = []
950952
try:

config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from ConfigParser import ConfigParser
1313
from urlparse import urlparse
1414

15+
SERVER_VERSION = "0.2.3"
1516
PROTOCOL_VERSION = 2
1617
CONFIG_FILE = join(os.getcwd(), 'ob.cfg')
1718

openbazaard.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
1212
from api.restapi import RestAPI
1313
from config import DATA_FOLDER, KSIZE, ALPHA, LIBBITCOIN_SERVERS,\
14-
LIBBITCOIN_SERVERS_TESTNET, SSL_KEY, SSL_CERT, SEEDS, SEEDS_TESTNET, SSL
14+
LIBBITCOIN_SERVERS_TESTNET, SSL_KEY, SSL_CERT, SEEDS, SEEDS_TESTNET, SSL, SERVER_VERSION
1515
from daemon import Daemon
1616
from db.datastore import Database
1717
from dht.network import Server
@@ -37,7 +37,6 @@
3737
from twisted.python import log, logfile
3838
from txws import WebSocketFactory
3939

40-
4140
def run(*args):
4241
TESTNET = args[0]
4342
LOGLEVEL = args[1]
@@ -303,6 +302,6 @@ def print_splash_screen():
303302
print "\_______ / __/ \___ >___| /" + OKBLUE + "______ /(____ /_____ \(____ (____ /__|" + ENDC
304303
print " \/|__| \/ \/ " + OKBLUE + " \/ \/ \/ \/ \/" + ENDC
305304
print
306-
print "OpenBazaar Server v0.2.1 starting..."
305+
print "OpenBazaar Server " + SERVER_VERSION + " starting..."
307306

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

0 commit comments

Comments
 (0)