changeset 388:b33045e7e08e

move server config into config.py
author Matt Johnston <matt@ucc.asn.au>
date Wed, 11 Jul 2012 22:50:23 +0800
parents 1ee4485b59a2
children 5e3880342390
files server/ts.py web/config.py
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/server/ts.py	Wed Jul 11 00:22:31 2012 +0800
+++ b/server/ts.py	Wed Jul 11 22:50:23 2012 +0800
@@ -1,7 +1,5 @@
 #!/usr/bin/env python2.7
 
-BTADDR = "00:12:03:27:70:88"
-SLEEP_TIME = 5
 # time that the bluetooth takes to get going?
 EXTRA_WAKEUP = 0
 
@@ -179,11 +177,11 @@
     while True:
         sock = None
         try:
-            sock = get_socket(BTADDR)
+            sock = get_socket(config.BTADDR)
         except Exception, e:
             print>>sys.stderr, "Error connecting:"
             traceback.print_exc(file=sys.stderr)
-        sleep_time = SLEEP_TIME
+        sleep_time = config.SLEEP_TIME
         if sock:
             next_wake = None
             try:
--- a/web/config.py	Wed Jul 11 00:22:31 2012 +0800
+++ b/web/config.py	Wed Jul 11 22:50:23 2012 +0800
@@ -1,3 +1,7 @@
+
+# for server
+BTADDR = "00:12:03:27:70:88"
+SLEEP_TIME = 5
 
 DATA_PATH = '/home/matt/templog/web/data'