mercurial/cmdutil.py
changeset 28451 c90cfe76e024
parent 28449 3072ce740945
child 28452 0bb01c8754bf
--- a/mercurial/cmdutil.py	Sat Feb 27 12:56:26 2016 +0100
+++ b/mercurial/cmdutil.py	Wed Mar 09 02:07:40 2016 +0000
@@ -827,16 +827,17 @@
         writepid(util.getpid())
 
     if opts['daemon_postexec']:
-        inst = opts['daemon_postexec']
         try:
             os.setsid()
         except AttributeError:
             pass
-        if inst.startswith('unlink:'):
-            lockpath = inst[7:]
-            os.unlink(lockpath)
-        elif inst != 'none':
-            raise error.Abort(_('invalid value for --daemon-postexec'))
+        for inst in opts['daemon_postexec']:
+            if inst.startswith('unlink:'):
+                lockpath = inst[7:]
+                os.unlink(lockpath)
+            elif inst != 'none':
+                raise error.Abort(_('invalid value for --daemon-postexec: %s')
+                                  % inst)
         util.hidewindow()
         sys.stdout.flush()
         sys.stderr.flush()