Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
b5dbecc8
Commit
b5dbecc8
authored
Jun 13, 2012
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #236 from alexanderhiam/experimental
webinterface.py compatibility with Python 2.6
parents
cf3cd8be
bddaee85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
webinterface.py
webinterface.py
+7
-3
No files found.
webinterface.py
View file @
b5dbecc8
#!/usr/bin/python
#!/usr/bin/python
import
cherrypy
,
pronterface
,
re
,
ConfigParser
,
threading
import
cherrypy
,
pronterface
,
re
,
ConfigParser
,
threading
,
sys
import
os.path
import
os.path
users
=
{}
users
=
{}
...
@@ -233,7 +233,11 @@ class XMLstatus(object):
...
@@ -233,7 +233,11 @@ class XMLstatus(object):
class
WebInterface
(
object
):
class
WebInterface
(
object
):
def
__init__
(
self
,
pface
):
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
)
config
=
ConfigParser
.
SafeConfigParser
(
allow_no_value
=
True
)
else
:
config
=
ConfigParser
.
SafeConfigParser
()
config
.
read
(
'auth.config'
)
config
.
read
(
'auth.config'
)
users
[
config
.
get
(
"user"
,
"user"
)]
=
config
.
get
(
"user"
,
"pass"
)
users
[
config
.
get
(
"user"
,
"user"
)]
=
config
.
get
(
"user"
,
"pass"
)
self
.
pface
=
pface
self
.
pface
=
pface
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment