hgext/patchbomb.py
changeset 12197 540693065d40
parent 12196 e42bc7f66e25
child 12199 17d604e522b4
--- a/hgext/patchbomb.py	Wed Sep 08 08:31:07 2010 +0200
+++ b/hgext/patchbomb.py	Wed Sep 08 08:31:07 2010 +0200
@@ -81,9 +81,7 @@
 from mercurial.node import bin
 
 def prompt(ui, prompt, default=None, rest=':'):
-    if not ui.interactive():
-        if default is not None:
-            return default
+    if not ui.interactive() and default is None:
         raise util.Abort(_("%s Please enter a valid value" % (prompt + rest)))
     if default:
         prompt += ' [%s]' % default