Fix a TypeError which occurs in pretend commit mode when vcs is None. Thanks
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 08:28:23 +0000 (08:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 08:28:23 +0000 (08:28 -0000)
to Fabian Groffen <grobian@g.o> for reporting. (trunk r12426)

svn path=/main/branches/2.1.6/; revision=12479

bin/repoman

index 129a4296e9d8227a206914ce7608587df6010bc2..c285bd6debbb567c306c0895c848d691aa829b28 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)