projects
/
public
/
pyceo-broken.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5b4d603
)
Added octal support to configuration module.
author
Michael Spang
<mspang@uwaterloo.ca>
Mon, 29 Jan 2007 02:27:16 +0000
(21:27 -0500)
committer
Michael Spang
<mike@freyr.utgard.net>
Mon, 29 Jan 2007 02:27:16 +0000
(21:27 -0500)
pylib/csc/common/conf.py
patch
|
blob
|
history
diff --git
a/pylib/csc/common/conf.py
b/pylib/csc/common/conf.py
index
439e412
..
c49bb62
100644
(file)
--- a/
pylib/csc/common/conf.py
+++ b/
pylib/csc/common/conf.py
@@
-108,14
+108,16
@@
def read(filename, included=None):
key, val = pair
# found quoted string?
- if val[0] == val[-1] == '"':
+ if val
and val
[0] == val[-1] == '"':
val = val[1:-1]
- # unquoted, found
float
?
- el
se
:
+ # unquoted, found
num
?
+ el
if val
:
try:
if "." in val:
val = float(val)
+ elif val[0] == '0':
+ val = int(val, 8)
else:
val = int(val)
except ValueError: