diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-20 20:13:18 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-20 20:13:18 +0000 |
commit | 97367096ed30fad377fc8a93d775a8c18b356288 (patch) | |
tree | 7d20e706233501fad7df36e17a829ea455d30b4f | |
parent | 5bb9687bf253632f0402b035a3ca4035296f670d (diff) | |
download | portage-97367096ed30fad377fc8a93d775a8c18b356288.tar.gz portage-97367096ed30fad377fc8a93d775a8c18b356288.tar.bz2 portage-97367096ed30fad377fc8a93d775a8c18b356288.zip |
Fix repoman --commitmsgfile logic. Thanks to Christian Heim <phreak@gentoo.org> for reporting.
svn path=/main/trunk/; revision=3179
-rwxr-xr-x | bin/repoman | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman index b11bf0fd4..fd67ce117 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1519,7 +1519,20 @@ else: print "myheaders:",myheaders print unlinkfile=0 - if not (commitmessage or commitmessagefile): + if commitmessagefile: + try: + f = open(commitmessagefile) + commitmessage = f.read() + f.close() + del f + except (IOError, OSError), e: + if e.errno == errno.ENOENT: + portage.writemsg("!!! File Not Found: --commitmsgfile='%s'\n" % commitmessagefile) + else: + raise + # We've read the content so the file is no longer needed. + commitmessagefile = None + if not commitmessage: print "Please enter a CVS commit message at the prompt:" while not commitmessage: try: @@ -1528,7 +1541,7 @@ else: exithandler() try: commitmessage+="\n(Portage version: "+str(portage.VERSION)+")" - except: + except AttributeError: print "Failed to insert portage version in message!" commitmessage+="\n(Portage version: Unknown)" if not commitmessagefile: |