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
bddaee85
Commit
bddaee85
authored
Jun 07, 2012
by
Alexander Hiam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't pass 'allow_no_value' to SafeConfigParser if Python < 2.7
parent
cf3cd8be
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 @
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
...
...
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