<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -91,6 +91,8 @@ class Recipe(object):
                 os.chdir(self.buildout['buildout']['directory'])
                 self.installed_from_cache = True
                 return self.options['location']
+            else:
+                raise zc.buildout.UserError(&quot;No repository in the download cache directory.&quot;)
         else:
             os.chdir(self.buildout['buildout']['download-cache'])
 </diff>
      <filename>zerokspot/recipe/git/__init__.py</filename>
    </modified>
    <modified>
      <diff>@@ -68,7 +68,22 @@ repository = %(repo)s
         self.assertTrue(os.path.exists(os.path.join(build['buildout']['download-cache'], self.repo_name, 'test.txt')))
         self.assertTrue(os.path.exists(os.path.join(self.tempdir, 'parts', 'gittest', 'test.txt')))
 
-    #TODO RaiseExceptionOnAbsentCache
+    def testRaiseExceptionOnAbsentCache(self):
+        testing.write(self.tempdir, 'buildout.cfg', &quot;&quot;&quot;
+[buildout]
+parts = gittest
+download-cache = %(cache)s
+install-from-cache = true
+
+[gittest]
+recipe = zerokspot.recipe.git
+repository = %(repo)s
+        &quot;&quot;&quot; % {'repo' : self.temprepo, 'cache': self.tempcache})
+
+        build = zc.buildout.buildout.Buildout(
+                    os.path.join(self.tempdir, 'buildout.cfg'), [])
+        self.assertRaises(zc.buildout.UserError, build.install, None)
+
 
     def testOffline(self):
         &quot;&quot;&quot;</diff>
      <filename>zerokspot/recipe/git/tests.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1eec2d899207b039d824c866503ad2fbc5d024c5</id>
    </parent>
  </parents>
  <author>
    <name>Alexander Artemenko</name>
    <email>svetlyak.40wt@gmail.com</email>
  </author>
  <url>http://github.com/zerok/zerokspot.gitrecipe/commit/70b0d19789d1e068f42b42403687270fd1d24041</url>
  <id>70b0d19789d1e068f42b42403687270fd1d24041</id>
  <committed-date>2009-06-16T03:51:33-07:00</committed-date>
  <authored-date>2009-06-16T03:51:33-07:00</authored-date>
  <message>Added raising exception when cache missing.</message>
  <tree>b18062ff8efa1f0e7e2e1472472f49b5bf68ed25</tree>
  <committer>
    <name>Alexander Artemenko</name>
    <email>svetlyak.40wt@gmail.com</email>
  </committer>
</commit>
