Commit b5dbecc8 authored by kliment's avatar kliment

Merge pull request #236 from alexanderhiam/experimental

webinterface.py compatibility with Python 2.6 
parents cf3cd8be bddaee85
#!/usr/bin/python
import cherrypy, pronterface, re, ConfigParser, threading
import cherrypy, pronterface, re, ConfigParser, threading, sys
import os.path
users = {}
......@@ -233,7 +233,11 @@ class XMLstatus(object):
class WebInterface(object):
def __init__(self, pface):
if (sys.version_info[1] > 6):
# 'allow_no_value' wasn't added until 2.7
config = ConfigParser.SafeConfigParser(allow_no_value=True)
else:
config = ConfigParser.SafeConfigParser()
config.read('auth.config')
users[config.get("user", "user")] = config.get("user", "pass")
self.pface = pface
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment