summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <javier.jardon@codethink.co.uk>2015-02-27 16:05:17 (GMT)
committerJavier Jardón <jjardon@gnome.org>2015-03-04 19:14:42 (GMT)
commitdbb482ec95b6e0110a32df000893880f4b92abeb (patch)
tree28ee4ed705168818fe29432956b0c09c09360d53
parent940ce227c4ca4700e6557cc110141312a5f73131 (diff)
downloadmorph-dbb482ec95b6e0110a32df000893880f4b92abeb.tar.gz
morphlib/sourceresolver.py: Do not duplicate what is already done in load_from_string()
-rw-r--r--morphlib/sourceresolver.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py
index cd183ee..5be373a 100644
--- a/morphlib/sourceresolver.py
+++ b/morphlib/sourceresolver.py
@@ -292,19 +292,14 @@ class SourceResolver(object):
return self._resolved_morphologies[key]
loader = morphlib.morphloader.MorphologyLoader()
- morph = None
text = self._get_file_contents(reponame, sha1, filename)
morph = loader.load_from_string(text)
- if morph is None:
- return None
- else:
- loader.validate(morph)
- loader.set_commands(morph)
- loader.set_defaults(morph)
+ if morph is not None:
self._resolved_morphologies[key] = morph
- return morph
+
+ return morph
def _detect_build_system(self, reponame, sha1, expected_filename):
'''Attempt to detect buildsystem of the given commit.