Fix a TypeError which occurs in pretend commit mode when vcs is None. Thanks
authorZac Medico <zmedico@gentoo.org>
Sun, 11 Jan 2009 19:42:13 +0000 (19:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 11 Jan 2009 19:42:13 +0000 (19:42 -0000)
to Fabian Groffen <grobian@g.o> for reporting.

svn path=/main/trunk/; revision=12426

bin/repoman

index 7269392932e6b781b28770d52a04c6e46f52dac2..1d6ef75d461bd0c4787a3bb199f053651eba5380 100755 (executable)
@@ -2158,7 +2158,12 @@ else:
                        mymsg.write("\n (Unsigned Manifest commit)")
                mymsg.close()
 
-               commit_cmd = [vcs]
+               commit_cmd = []
+               if options.pretend and vcs is None:
+                       # substitute a bogus value for pretend output
+                       commit_cmd.append("cvs")
+               else:
+                       commit_cmd.append(vcs)
                commit_cmd.extend(vcs_global_opts)
                commit_cmd.append("commit")
                commit_cmd.extend(vcs_local_opts)