changeset 40:4ea66cb5485d

better error message
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 31 Oct 2011 18:53:46 -0700
parents 920afc079905
children 38aa1d47c461
files buttercup/source.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/buttercup/source.py	Sun Oct 16 17:21:37 2011 -0700
+++ b/buttercup/source.py	Mon Oct 31 18:53:46 2011 -0700
@@ -38,8 +38,12 @@
         if os.path.exists(self.directory()):
             hgdir = os.path.join(self.directory(), '.hg')
             assert os.path.exists(hgdir), "Not an hg directory: %s" % hgdir
-            call(['hg', 'pull'], cwd=self.directory())
-            call(['hg', 'update'], cwd=self.directory())
+            try:
+                call(['hg', 'pull'], cwd=self.directory())
+                call(['hg', 'update'], cwd=self.directory())
+            except:
+                print 'Directory: %s' % self.directory()
+                raise
         else:
             if not os.path.exists(self.srcdir):
                 os.makedirs(self.srcdir)