git://git.onelab.eu
/
sface.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f0882cb
)
handle blank rspecs without faulting
author
smbaker
<smbaker@fc8clean.lan>
Fri, 6 Jan 2012 06:48:06 +0000
(22:48 -0800)
committer
smbaker
<smbaker@fc8clean.lan>
Fri, 6 Jan 2012 06:48:06 +0000
(22:48 -0800)
sface/sfidata.py
patch
|
blob
|
history
diff --git
a/sface/sfidata.py
b/sface/sfidata.py
index
4f2749e
..
9a2710a
100644
(file)
--- a/
sface/sfidata.py
+++ b/
sface/sfidata.py
@@
-80,9
+80,11
@@
class SfiData:
rspec_file = config.getSliceRSpecFile()
if os.path.exists(rspec_file):
xml = open(rspec_file).read()
rspec_file = config.getSliceRSpecFile()
if os.path.exists(rspec_file):
xml = open(rspec_file).read()
- rspec = RSpec(rspec=xml) #rspec = parse_rspec(xml)
- #self.purgeNonSliceResources(rspec)
+ if (xml.strip()==""):
+ return None
+
+ rspec = RSpec(rspec=xml)
return rspec
return None
return rspec
return None
@@
-91,7
+93,11
@@
class SfiData:
rspec_file = config.getResourcesRSpecFile()
if os.path.exists(rspec_file):
xml = open(rspec_file).read()
rspec_file = config.getResourcesRSpecFile()
if os.path.exists(rspec_file):
xml = open(rspec_file).read()
- rspec = RSpec(rspec=xml) #rspec= parse_rspec(xml)
+
+ if (xml.strip()==""):
+ return None
+
+ rspec = RSpec(rspec=xml)
return rspec
return None
return rspec
return None